Setting up a cronjob on Google Compute Engine

后端 未结 1 944
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 05:25

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

相关标签:
1条回答
  • 2020-12-12 06:09

    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.

    0 讨论(0)
提交回复
热议问题