Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Are you using SSH keys to make the connection between hosts or does it prompt you for a password if this is run at the command line? Without SSH keys it will not run from cron.
I just installed the mail utility - nothing in either of those error logs
So you need to wait for 1:00 AM to see if something comes out or are you testing the crontab in real time?
Indeed nothing in the logs means that the cron job didn't run at all, as you've anticipated in your first post. Otherwise you should see something like
Code:
Dec 22 1:00:01 localhost CROND[17764]: (casper) CMD (/usr/bin/scp casper@192.168.60.17:/data/binary/filetoTransfer.txt casper@192.168.81.95:/home/casper/)
in /var/log/cron. If this is the case, you have to investigate the proper functioning of the cron daemon. Hence the checklist:
1. Which Linux OS are you running on?
2. Which version of the cron daemon is installed?
3. Is the cron service enabled?
4. Did you successfully run a job in the past, using the casper's crontab?
5. Is the user casper allowed to use crontab (check /etc/cron.allow and /etc/cron.deny)?
http://unixgeeks.org/security/newbie/unix/cron-1.html
If there is neither a cron.allow nor a cron.deny file, then the use of cron
is unrestricted (i.e. every user can use it).
there is not an allow or deny file in the etc directory
Can you run a cron entry as root (from the root crontab)?
Have you checked this page https://help.ubuntu.com/community/CronHowto? It lists a couple reasons, such as no trailing newline in the crontab file, or a user not in /etc/shadow that could cause the job not to run.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.