Crontab @reboot not working anymore in Stretch?

If none of the more specific forums is the right place to ask

Crontab @reboot not working anymore in Stretch?

Postby jenssen99 » 2017-12-31 12:56

Hello,

I am looking to switch to Debian Stretch (9) instead of Debian Jessie (8).

In version 8, I have a program that I start via de crontab with the command @reboot. This works perfect, the program does not have to wait to finish the boot process to work properly. In version 9, I added the same line to the crontab, but the program will not start. I also added a sleep, but that did not work either.

When I compare the crontab status, I see the differences below. Anyone have an idea? I do want to keep using @reboot, because it is very simple to add and test programs at reboot.
Version 8:
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled)
Active: active (running) since Sun 2017-12-31 14:18:14 CET; 28min left
Docs: man:cron(8)
Main PID: 601 (cron)
CGroup: /system.slice/cron.service
├─601 /usr/sbin/cron -f
├─624 /usr/bin/SCREEN -S virtualhere -d -m /prog/virtualhere/vhcli...
└─625 /prog/virtualhere/vhclientx86_64

Dec 31 13:47:29 domoticz [625]: mDNS_AddDNSServer: DNS server limit of 64 r...er
Dec 31 13:47:29 domoticz [625]: mDNS_AddDNSServer: DNS server limit of 64 r...er

Version 9:
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2017-12-31 14:23:24 CET; 19min ago
Docs: man:cron(8)
Main PID: 522 (cron)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/cron.service
└─522 /usr/sbin/cron -f

Dec 31 14:23:24 domoticz2 systemd[1]: Started Regular background program processing daemon.
Dec 31 14:23:24 domoticz2 cron[522]: (CRON) INFO (pidfile fd = 3)
Dec 31 14:23:24 domoticz2 cron[522]: (CRON) INFO (Running @reboot jobs)
Dec 31 14:23:24 domoticz2 CRON[526]: pam_unix(cron:session): session opened for user root by (uid=0)
Dec 31 14:23:24 domoticz2 CRON[533]: (root) CMD (/prog/virtualhere/vhclientx86_64)
Dec 31 14:23:24 domoticz2 vhclientx86_64[534]: VirtualHere Client: VirtualHere Client 4.3.7 starting (Compiled: Dec 13 2017 00:44:11)
Dec 31 14:23:24 domoticz2 vhclientx86_64[534]: VirtualHere Client: Using config at /root/.vhui
Dec 31 14:23:24 domoticz2 CRON[526]: (CRON) info (No MTA installed, discarding output)
jenssen99
 
Posts: 2
Joined: 2017-12-31 12:44

Re: Crontab @reboot not working anymore in Stretch?

Postby Dai_trying » 2017-12-31 14:02

It looks like there was a problem processing the crontab entry as it wants to mail some output to you but you have no MTA installed, installing postfix and setting it to local would give you some information in the email regarding reasons for failure (or often just terminal output).
Dai_trying
 
Posts: 548
Joined: 2016-01-07 12:25

Re: Crontab @reboot not working anymore in Stretch?

Postby jenssen99 » 2018-01-01 10:55

@reboot does not work anymore as root, but can be used as a different user.

Looks like something different in kernel 4.9, tested it on Jessie 8.9 with backported kernel 4.9, then the problem occurs.

Can be marked als solved.
jenssen99
 
Posts: 2
Joined: 2017-12-31 12:44


Return to General Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable