Cron setlock: fatal


#1

Ever since the great power-outage of March 2013 my cron-jobs have all been acting strangely.
Some of them have started working properly (where before there were errors), while others are halting with something like:

setlock: fatal: unable to lock /tmp/cronlock.12345678.910111213: temporary failure

the long string of numbers was changed, but you get the point. Anyone else ever deal with this? Know of a solution?

I have a ticket in, but if there is a quick solution I am not averse to trying something


#2

Remove them and re-add them back in.


#3

I was secretly hoping there would be an easier option.

However, I have not had any error messages for the last hour, so the problem may have magically been fixed (possibly in response to my ticket)

If I do start getting the messages again I will just go in and remove/re-add all of the jobs

Thanks!


#4
$ crontab -l > cronbackup
$ crontab -r
$ crontab cronbackup
$ rm cronbackup

EDIT:

Actually, that might not fix lock errors ('cause the backup will have the same lock files). hrmm…

If you have 100’s of cron jobs, consider moving them to a script and just have one job call that.


#5

They fixed it, so that saved me from having to dinker with deleting/adding all of the cron-jobs.

I am saving your code though for future reference.
Thanks!