LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-02-2010, 11:27 PM   #1
sinfuldips
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
cronjob not working intermittently


Hi there

I have a cronjob running on a sol 10 U6 server which runs every 15 minutes. The cronjob is a perl script. But I have noticed that after every few weeks the job stops running all of a sudden. There are other cronjobs running on the system from the same user and from other users which work fine, it is just this one job from one user that causes the problem.

any ideas?

Thanks
 
Old 02-03-2010, 05:40 AM   #2
dev_dks
LQ Newbie
 
Registered: Jul 2006
Location: INDIA
Distribution: RHEL/SOLARIS 10/UBUNTU/CENTOS
Posts: 13

Rep: Reputation: 1
Have a keen eye on cron logs for that particular job.. and also i would like to know more about task peformed by that perl script. and try to redirect the logs of that particular crontab to some file, so that it can be easily traced.
 
Old 02-03-2010, 11:49 PM   #3
sinfuldips
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Hi dev_dks I have looked into the /var/cron/log. but its as if the job never happened, but crontab -l shows me the job is there. If I do a crontab -e and then not modify anything, the job starts again and fails after a couple of weeks.
The job actually runs the script from a location and it checks a particular directory and updates the status from the first directory to the status of the second.
Beats me, I have never seen anything like this. At the moment it is being redirected to /dev/null.
I could redirect to another file but if the job never runs there will not be any output. Is there a way to see why the job never ran?
 
Old 02-04-2010, 01:21 AM   #4
deepak_p86
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Rep: Reputation: 0
Hi sinfuldips,

As per conversion till now on cronjob, I am just briefing the things again that I have understand the issue correct.

you have schedule a Perl script using cronjob which will execute at the interval of 15 mins. right?

And as per your observation it was working fine for 2 months n now it suddenly stop working.

Will you share , how u r making sure that script was really working was you tracking the changes which script should does... or you have logs for the same.

One more thing if you have schedule then you will able to see the scheduled task in crontab -e which but in that case you have to make sure the path n parameter are correct.

I would suggest to make simple print script schedule it which will redirect log to particular file at the interval of 1 min. n in other session you can tail that log... you will get the exact picture... what's going on.
 
Old 02-04-2010, 01:31 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You job is probably running but not producing what you are expecting for some reason you should investigate instead of focusing on cron itself. Without notable code change, Solaris cron has been running quite reliably for several decades on millions of computers so I doubt such a major bug would emerge these days. You can add tracing instructions in it to sort it out (eg: touch /tmp/myjob as first instruction).
 
  


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
cronjob not working.. vivendi Linux - Newbie 6 08-12-2009 04:40 PM
cronjob not working vinaytp Linux - Newbie 3 06-23-2009 09:06 AM
Cronjob stops working after a while ToonM Slackware 4 01-23-2007 12:53 AM
Broadcom network card working intermittently in laptop qscomputing Linux - Hardware 5 05-17-2006 10:26 AM
Samba share working intermittently - don't know why swampdog2002 Linux - General 3 08-23-2005 07:54 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 12:23 PM.

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