Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I wrote a scrip to backup my home file which i set it to exec it every five minutes ,
that the crontab is :
*/5 * * * * job #(i 've tested it before add to crontab ,it works fine ) >>/home/myhome/error.log
but as i list the backup file there's nothing ,and found check the error.log ether.
i'm not sure what had happened so i seek for the deamon "crond",it's working ,
the second is the /etc/cron.deny and /etc/cron.allow,both file not exist .So i don't why
not my cron job not works ,who knows be help me thanks !
cron has a minimal default environment, so you need to specify the complete (absolute) path to any cmds and/or files you use.
Please post your code for further help (in code tags).
cron has a very skimpy PATH. One common cause of the type of problem that you are experiencing is that Linux can find the program when you execute it from the command line but not find it when you execute it from cron. The solution is to specify the full path name for the program that you are executing in cron. For example use:
/usr/bin/backutil
instead of:
backutil
Actually, I'd simplify by putting the shell in the 1st line and not using sh cmd (in all instances).
Also, supply the complete path for tar, it's NOT a shell built-in.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.