This month, I bought a book, "Linux system command and Shell Scripting Practice Guide", saw a recurring task cron. Suddenly, there is an idea: is there such a mechanism on Mac?
Add oneself also in the second half of 15 also learned a bit of Python script, Haha, immediately produced the idea of "Mac using crontab periodically execute Python script", have to say
Network is to force, incredibly still really have, suddenly feel the endless wow.
1. Crontab-e to edit and customize your own tasks
For information on how to define your own tasks, we can refer to here
2. Edit the Python script:
3. The effect is as follows:
Well, the basic effect of the operation is this, of course, you can diy a lot of things, such as the periodic deletion of files Wow, Periodic grab pack Wow, periodic app packaging Wow, haha, of course there are other,
After all, the script you can write casually, or you do not have to use a Python script, in fact, there are tasks can be created. Where does the path to the test.py script in this case be placed? I leave a suspense here, you want to go (very simple)
Use crontab to periodically execute Python scripts on Mac