Solaris / OpenSolarisThis 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
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 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.
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.
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?
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.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.