crontab -e
Edit crontab file, or create one if it doesn’t already exist.
crontab -l
crontab list of cronjobs , display crontab file contents.
crontab -r
Remove your crontab file.
I found this visual from a website.
Crontab only works with absolute paths--this means that the paths have to be explicit not relative.
So, a way to get around this is to cd
into the relevant directory i.e.
0 0 * * * cd /home/path/ && /home/path/script.sh
And to include paths that have spaces in them is by putting them inside quotations: "path/Some Folder"
.
Must explicitly give the path to the Python folder that contains the Python binary.
0 0 * * * /usr/bin/python "/home/My Project/script.py"