0

I have a python file that has to be run with sudo elevation every 6 hours.

I created the cronjob using sudo crontab -e and then added the entry:

0 */6 * * * cd /home/timeflow/backup && sudo /usr/bin/python3 /home/timeflow/backup/backup_db.py

However, this file is never ran. I have also tried removing sudo from sudo /usr/bin/python3 home/timeflow/backup/backup_db.py, however this does nothing as well. For clarity:

0 */6 * * * cd /home/timeflow/backup && /usr/bin/python3 /home/timeflow/backup/backup_db.py

I have no idea why this is not working. I tried to do a smaller job, by creating a random python file in the same repo to no avail. The entry was:

* */6 * * * touch /home/timeflow/test.py
chxnge
  • 1

0 Answers0