@reboot jobs for crond not executed

Ask questions about Arch Linux ARM. Please search before making a new topic.

@reboot jobs for crond not executed

Postby hp4 » Thu Jul 10, 2014 1:20 pm

I've been running a script after reboot by using the crontab-@reboot-entry for more than 1 year without any problems.

On 21 Jun 2014 I've done a system-update with pacman. One of the many updated packages was

cronie 1.4.11-1 -> 1.4,11-2

From that time on the @reboot-entries weren't executed anymore while all other jobs (hourly,...) are still executed.

No hints in syslog and journal. The @reboot-jobs simply have disappeared in the log files.

Any idea how to find out whats wrong with cronie (or maybe some other update related to cronie) ?
hp4
 
Posts: 45
Joined: Thu May 30, 2013 12:09 pm

Re: @reboot jobs for crond not executed

Postby krabat » Fri Jul 11, 2014 11:19 am

I think to answer this question more information is needed. Which file are you using to start the job, what does the line to do so look like, file permissions. Some information about the job itself might be helpful, too.

The update you mentioned involved just kicking cronie out of the base group [0] so technically nothing should have changed.

Also please note that all the usual "cron" jobs such as updating the man page index or updatedb are no longer handled by cronie but by systemd's Calendar Timers [1]. All of /etc/cron.* except .d are by default empty since then.
So "all the other jobs" still being executed could be an artifact due to the fact that systemd taking over the jobs masks a complete failure of cronie. Output of '# systemctl status cronie.service'?

[0]changelog on archlinux.org
[1] discussion on arch-dev-public
krabat
 
Posts: 57
Joined: Wed Jun 04, 2014 8:03 pm

Re: @reboot jobs for crond not executed

Postby hp4 » Thu Jul 31, 2014 1:59 pm

sorry for not being able to answer the last weeks. Here a short test, which I've entered some days ago:

crontab -l
@reboot ( ps -aux &>/home/hape/testmycron )
@reboot ( echo rebooted ; ( /home/hape/bin/minidlnacntl &>/dev/null & ) ; sleep 300 ; echo started at `date` ) &>>/home/hape/minidlnacntl.log
15 3 * * * /usr/bin/shutdown -r +1

every command I've tried up to now in the "@reboot"-row will not be executed, neither scripts nor the ps-cmd!!! Not even a hint in the system.log or cron.log!

I've entered the first line with the ps-cmd for testing purposes. The entry with script "/home/hape/bin/minidlnacntl" has been working fine until the updates some weeks ago, but now no effect is seen. They simply seem to be omitted.

but the nightly reboot at 03:15 AM is executed !!!

Here the entries I've found in cron.log, I can't see any hint that the @reboot-commands have been executed.

Jul 31 03:01:01 mars anacron[8306]: Jobs will be executed sequentially
Jul 31 03:15:01 mars CROND[8385]: (root) CMD (/usr/bin/shutdown -r +1)
Jul 31 03:15:02 mars CROND[8384]: (root) CMDOUT (Shutdown scheduled for Do 2014-07-31 03:16:02 CEST, use 'shutdown -c' to cancel.)
Jul 31 04:01:01 mars CROND[805]: (root) CMD (run-parts /etc/cron.hourly)
Jul 31 04:01:02 mars anacron[811]: Anacron started on 2014-07-31
Jul 31 04:01:02 mars anacron[811]: Will run job `cron.daily' in 21 min.

---------------------------
I don't know whether cron uses any database functions therefore I have to say, that since one of the last updates my system (Raspberry Pi) also has some serious problem with the mysql/mariadb-installation, which fails during startup due to memory problems.
hp4
 
Posts: 45
Joined: Thu May 30, 2013 12:09 pm

Re: @reboot jobs for crond not executed

Postby krabat » Thu Sep 25, 2014 7:21 pm

I applied both @reboot lines from your last post exactly as stated except the script, the user and the output files' names. Everything worked as expected.

As your crontab, which is a user's one, no system crontab file, can run shutdown successfully, it must be the root's one. On the other hand, it is intended to execute and write files in /home. So maybe there are some permission problems.

But considering that things worked flawlessly on my system and the problems arose after an update involving only a minor change to cronie I tend to believe it's quite something different that got screwed and this cronie issue is just a kind of symptom. You might want to have another look at the entries in pacman.log affecting the date in question.
krabat
 
Posts: 57
Joined: Wed Jun 04, 2014 8:03 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 22 guests