You can find the files in the /etc/cron.d directory. You can control access to the crontab command and specify who runs commands using two files-the ny and cron.allow files. You can specify the email account to receive the cron job output using the MAILTO variable, like in the example 6 10 */3 * /home/user/script.sh Cron Job Permission The crontab command runs quarterly on the tenth day at 6 am, executing the specified order: The cron job uses wget to download a file to a directory named cronfolder every 30 minutes: */30 * * * */usr/bin/wget -P /home/username/cronfolder/ It performs monitoring every three hours: The above cron job runs twice daily, executing database backup at 4 am and 6 pm: The cron job runs once daily, executing database backup at midnight: Taking your time to understand the cron structure and syntax will enable you to write cron commands correctly, but let’s look at five real examples that make it more straightforward.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |