running a python script with cron

前端 未结 1 1326
清酒与你
清酒与你 2020-12-07 21:07

It might be very simple question, but how could I run a python script on my fedora dist every 2 days?

Thanks

Antonis

相关标签:
1条回答
  • 2020-12-07 21:52

    It is a question on cron. First is add a SHEBANG line on top of your python script.

    #!/usr/bin/env python
    

    Make your script executable with chmod +x

    And do a crontab -e and add 0 0 */2 * * /path/to/your/pythonscript.py

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