I was wondering if my crontab jobs were written correctly. I am hoping to run them on a VPS and monitoring them isn't really possible. Without further ado here are my cron jobs:# cd into directory at 2:57 AM 57 2 * * 1-5 cd /folder_name# activate the virtual environment58 2 * * 1-5 . env/bin/activate# run the main script59 2 * * 1-5 python main.py# at 5pm break the script (worried the most about this part)0 16 * * 1-5 ^CAlso I changed my system clock to be eastern time, does that mean the cron jobs will run using the eastern time zone? Thanks.
Help With Cron/Python
cron;python
No, cron is not a shell.  Write a script:#!/bin/shcd /folder_name. env/bin/activateexec python main.pyMake it executable, then point a crontab entry to it:57 2 * * 1-5 /path/to/scriptThe script should then run every Monday to Friday, at 2:57 in (your machine's idea of) local timezone.  If you configured your mail system properly the results (if any) are mailed to you.