ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey guys, I have an rsync script I wrote that I have tested and it works perfectly when I run it manually. Now I am working on a server setup script and I have gotten my setup script to create the rsync script in /etc/cron.hourly and restart crond. To spite the fact that the script is in /etc/cron.hourly and I have restarted crond, the script does not run.
With that said, how can I script adding the rsync script to run hourly as a cron job?
Since cron has a limited path, make sure to give the whole path to the commands and files.
Normally root should recieve an email if any problems.
Take a look in the log files for some pointers.
Since cron has a limited path, make sure to give the whole path to the commands and files.
Normally root should recieve an email if any problems.
Take a look in the log files for some pointers.
It is a single command and it uses absolute path names so thats not a problem.
I got it sorted out. Not sure why it wasn't running but I simply wrote a entry into /etc/crontab and the restarted crond and it works. I know you are supposed to use crontab -e to add jobs but that does it for a user, this way I can script it and have the system run it as root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.