This is my first post here, I'm practically new to crontabs. I have understood the basic method of writing crontabs and executing them.
I need help figuring out how to add a perl script to cron.daily/cron.d scripts. I have looked in all older questions in Forums, but couldn't find the correct method of calling this and having it run at a certain time of the day.
Can someone please explain to me how to accomplish the following:
1. I have a perl script that does a mysqldump. The script works from the command line. script at the following location:
I have tried executing it like so:
2.There are two directories in /etc/ .. cron.d and cron.daily. From what I have read in all other posts is this: if logged in as root, add the script to cron.daily or if logged in as user, add the script to cron.d
3. My question is: how do i add a perl script to any one directory? Just add a file to the relevant directory with the same name as the script and what do I put in this file? a simple absolute path to the script or does it need anything else?
4. Also, how do I specify the time to run? I would like to test this before setting this up as root and adding it to cron.daily so that it runs at the time given in crontab run-parts. Do I specify the file name under cron.d in crontab -e and will it will? Any syntax that I need to add it in other than
10 12 18 10 * root /etc/cron.d/file_name
? Also, how do I get the output copied to my directory under auto_home/? Seems like root doesn't have access to write to my dir.