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.
linux-3jcp:/home/varunb # date ; tail -f /var/log/messages | grep cron Fri Jan 25 10:18:07 GMT 2013 Jan 25 10:17:41 linux-3jcp crontab[12870]: (root) REPLACE (root) Jan 25 10:17:41 linux-3jcp crontab[12870]: (root) END EDIT (root) Jan 25 10:18:01 linux-3jcp crontab[13691]: (wwwrun) LIST (wwwrun) Jan 25 10:18:01 linux-3jcp crontab[13693]: (wwwrun) LIST (wwwrun) Jan 25 10:18:01 linux-3jcp crontab[13699]: (wwwrun) REPLACE (wwwrun)
command is fine and works if I run it directly on command prompt.
But for every minute i am testing crontab to work. Its not working.
Please suggest me.
Just to check whether cron tab is working or not???
That is single line command which is working on command prompt,
but if running through crontab it is not working. And yes i am running it every minute.
Code:
linux-3jcp:/home/varunb # ls
.bash_history .viminfo
linux-3jcp:/home/varunb # date
Fri Jan 25 12:37:52 GMT 2013
linux-3jcp:/home/varunb # /bin/echo "Hello" >> /home/varunb/hello.txt
linux-3jcp:/home/varunb # cat hello.txt
Hello
linux-3jcp:/home/varunb # date
Fri Jan 25 12:38:03 GMT 2013
linux-3jcp:/home/varunb # date
Fri Jan 25 12:39:10 GMT 2013
linux-3jcp:/home/varunb # cat hello.txt
Hello
linux-3jcp:/home/varunb #
Also i am running as root, i don think there will be issue with the permissions.
Which distro is this?
On my Centos system the crontab files are in /var/spool/cron.
Can you also check the ownerships, perms, SELinux, possibly also ACLs.
Re SELinux, do you seen anything in /var/log/audit dir?
If cron has an issue running a job, it usually emails the owner; in your case root.
Which distro is this?
On my Centos system the crontab files are in /var/spool/cron.
Can you also check the ownerships, perms, SELinux, possibly also ACLs.
Re SELinux, do you seen anything in /var/log/audit dir?
If cron has an issue running a job, it usually emails the owner; in your case root.
Code:
linux-3jcp:/home/varunb # cat /etc/issue
Welcome to SUSE Linux Enterprise Server 10 SP2 (x86_64) - Kernel \r (\l).
It was working for all the users and root user also, suddenly stoped working last week.
So just gave the example for root user, which is not working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.