Crontabs: Automating Python Scripts

  • create a DB
  • load data into DB
  • query data
  • list all DB
  • delete a DB

The command line tool

import sys
if sys.argv == 'runcron':
runcron()

The Problem

Setting up Crontabs

* * * * * cd /path/to/script/directory && /path/to/python3 /path/to/script 

Voila

if __name__ == "__main__":    
run_cron("awesomeDatabase")

--

--

--

Software Engineer — Blockchain, Cybersecurity, and Commercial Space

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

My Journey into Web Development and GDG Warri

“SWEET VALENTINE DAY” EVENT IS HAPPENING! JOIN NOW!

Conventional User Authentication & Authorization in Web Application

Advent of Cyber 3 (2021): Day 21 Write-up Needles In Computer Stacks [TryHackMe]

IELTS Academic writing task 1 — How to write a report based on a flowchart or a process diagram?

Food for Agile Thought #261

Activating Sleeping Guard Scene

GameDev Unity Log, day one

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Juliana Mei

Juliana Mei

Software Engineer — Blockchain, Cybersecurity, and Commercial Space

More from Medium

Introduction to Continuous Integration and Continuous Delivery with Python Flask

Introduction to Docker

Spreedsheats API — Python

Hands-On Guide to Restful API using Flask Python.