I detected that vixie-cron (4.1-r8) does not run weekly and monthly cron jobs. The reason is that the 'find' call to delete old 'lastrun'-files fails for this two but not for hourly and daily jobs, because of the used \( \) in the TIME variable. For some reason the following is not working (find says: "paths must precede expression", Usage: ...): TIME="\( -cmin +44645 -or -mmin +44645 \)" [...] find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; &>/dev/null || true If I substitude the content of TIME manually inside a shell: find ${LOCKDIR} -name cron.$BASE \( -cmin +44645 -or -mmin +44645 \) -exec rm {} \; &>/dev/null || true then it's working correctly (with LOCKDIR and BASE set, of course). The \( \) are the issue (there are not present for 'hourly' and 'daily'). If there are outside the variable then it's working for all four cases: TIME="-cmin +44645 -or -mmin +44645" [...] find ${LOCKDIR} -name cron.$BASE \( $TIME \) -exec rm {} \; &>/dev/null || true I tried to figure out this issue (maybe a problem with the shell expansion) but I didn't found anything. I will append a small patch.
Created attachment 80304 [details, diff] Fix for /usr/sbin/run-crons to delete correctly 'weekly' and 'monthly' lockfiles
i am not sure i have seen this bug. anybody on cron-bugs able to reproduce it? the patch looks harmless though...
the current run-crons doesnt expose this bug anymore. >>>>>> hourly) #>= 1 hour, 5 min -=> +65 min TIME="-cmin +65" ;; daily) #>= 1 day, 5 min -=> +1445 min TIME="-cmin +1445" ;; weekly) #>= 1 week, 5 min -=> +10085 min TIME="-cmin +10085" ;; monthly) #>= 31 days, 5 min -=> +44645 min TIME="-cmin +44645" ;; <<<<<< please reopen if i am mistaken. thanks.