How can I create cron jobs in specific files on Linux Centos

MOtaro Site asked:

I want to have a separate folders for cron jobs like:

/mydata/cronjobs

Now in that folder I want to have files like backup_server which will have the content like:

30 3 * * 1-5 /home/user/scripts/backup.sh 
30 3 * * 1-5 /home/user/scripts/backup2.sh 

Similarly, I want to have more files in that directory for each separate cron job so that I can centralize and separate the cron jobs from one folder.

How can I make root run those jobs for all files in that folder?

My answer:


Just put your files in the /etc/cron.d directory.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.