简体   繁体   中英

running a python script with cron

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

Thanks

Antonis

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM