How To Write Cron Job In Python . Add a line that resembles the one below. Running a script from a python virtual environment. python subprocess call to setup crontab Stack Overflow from stackoverflow.com Cron.remove_all () the following example will remove all cron jobs and show an empty list. Thus the format is as follows. In unix, a list of shell commands, along with the execution schedules, can be specified by a crontab (cron table).