LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-16-2012, 10:31 PM   #1
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Rep: Reputation: 22
vixie-cron mysteriously not running jobs.


This is a double-post from the gentoo forums where it ran dry. Hoping someone here can help.

Headscratcher. I recently went through the baselayout2 upgrade. Everything seems to work accept vixie-cron. According to /var/log/messages, my jobs are run. However, there is definitely no output from them. I have one simple perl script which should just dump a single line into a file, yet, it doesn't.

I've tried unemerging and re-emerging vixie-cron but to no avail.
 
Old 05-16-2012, 11:39 PM   #2
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Can you show us what have you tried and what errors or output you're getting?
 
Old 05-17-2012, 06:36 AM   #3
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
Only really tried re-emerging vixie-cron.
Tailing /var/log/messages shows that the scripts are indeed executed. However, even a simple 'echo Hello World > tmp.out' doesn't produce the file -- thus, I've deducted that this is just nuts.

Not sure where else to look. vixie-cron logs to the syslog, which says everything is fine. Yet, it's not. Frustrated.

Note that this took place after I did the baselayout2 upgrade but I followed the instructions and everything else works fine. Not sure if that is the cause or not.
 
Old 05-17-2012, 06:47 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
The location of the output file from echo Hello World > tmp.out depends on the working directory when it is executed. echo Hello World > /tmp/tmp.out would make it easier to check whether the file had been created.
 
Old 05-17-2012, 06:18 PM   #5
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
Sry if that was confusing. I'm actually outputting to a specific spot -- just wanted to give an easy example for clarities sake.
 
Old 05-17-2012, 07:01 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
So, try eg
Code:
5 10 * * * echo "Hello World" > /tmp/tmp.out
and tell us if it appears.
Also look in /var/log/cron, /var/log/messages and check with mailx as the job owner and as root.
cron normally emails at least one of those users if it has a problem.
 
Old 05-17-2012, 08:10 PM   #7
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
Hi

I've updated the crontab to have the echo command as above.
I have no /var/log/cron file. cron logs to the syslog (messages) only it seems. The jobs seem to be running.

Code:
May 18 10:01:01 txlnx07 cron[26576]: (paule) CMD (echo "Hello World" > /tmp/tmp.out)
May 18 10:02:01 txlnx07 cron[26866]: (paule) CMD (echo "Hello World" > /tmp/tmp.out)
May 18 10:03:01 txlnx07 cron[27222]: (paule) CMD (echo "Hello World" > /tmp/tmp.out)
May 18 10:04:01 txlnx07 cron[27530]: (paule) CMD (echo "Hello World" > /tmp/tmp.out)
May 18 10:05:01 txlnx07 cron[27971]: (paule) CMD (echo "Hello World" > /tmp/tmp.out)
Didn't have mailx installed. As such, there is none for me now nor root. However, I see this in the log when grepping for cron.
Code:
May 18 10:05:01 txlnx07 cron[27969]: (paule) MAIL (mailed 24 bytes of output but got status 0x0001
That could be something I suppose -- it ran after another specified job though, not my Hello World. I've installed mailx now so I guess we'll see what happens.
 
Old 05-19-2012, 06:39 AM   #8
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
Did I find a problem that has stumped the Linux community?
 
Old 05-20-2012, 11:52 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
What did mailx say for job owner and/or root?

Incidentally, in *nix a successful rtn status is usually zero, so '1' is bad.
Read-only target filesystem? Target FS is full?
Ownerships/perms? SElinux?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron jobs not running henrybg Linux - Enterprise 10 01-28-2013 10:23 AM
Vixie-Cron not running /etc/cron.d/ dman777 Linux - Software 1 02-09-2011 07:42 AM
[SOLVED] Problems running cron jobs Pricy Linux - Newbie 8 09-21-2010 07:22 AM
[SOLVED] Cron jobs not running saldon Linux - Server 2 01-08-2010 10:01 AM
cron jobs not running scarr3d Linux - Software 7 05-25-2004 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration