I am new to setting up cronjobs and I\'m trying to do it on a virtual machine in google compute engine. After a bit of research, I found this StackOverflow question: Running
Edit a cron jobs with crontab -e
and inset a line:
* * * * * echo test123 > /your_homedir_path/file.log
That will write test123
every minute into file.log file.
Then do tail if
and wait a couple minutes. You should see test123
lines appearing in the file (and screen).
If it runs try running your python file but first make your .py file executable with "chmod +x script.py
"
Here you can find my reply to similar question.