We'll set it to run as a cronjob by editing the job list (with the nano editor): env EDITOR =nano crontab -e ![]() My script is called backup.sh, and will dump my MySQL database to a zip file. I personally use cronjobs to make regular backups of my MySQL databases, so I will show how to set this up to run once a day. ![]() │ │ │ │ └─── day of week ( 0 - 6 ) ( 0 to 6 are Sunday to Saturday, or use names 7 is Sunday, the same as 0 ) A job is specified in the following format (first line): * * * * * command to execute You add a job to crontab by editing the job list. If you are on a Mac (or Linux), you can use our good friend crontab, which is a scheduling tool that will run jobs (scripts) at regular intervals. Running them automatically is even greater. Running scripts on your computer is great. ![]() Article by Ole Michelsen posted on February 22, 2015
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |