Linux – How to create cron jobs in specific files on Linux Centos

centoscroncron.dailyincrontablinux

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?

Best Answer

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