Question: Users can configure cronjobs @reboot, but the cron environment is not ready for users at boot time. How can cron be forced to run only after the system is ready for users on Ubuntu?
On a Ubuntu 19.04 server I created the following cronjob:
crontab -l
@reboot /usr/local/bin/forever start -c /usr/local/bin/node /home/username/subdirectory/someservice.jsAfter reboot the syslog says:
Jul 26 16:30:06 METIS systemd[1]: cron.service: Succeeded.
Jul 26 16:31:59 METIS cron[1287]: (CRON) INFO (pidfile fd = 3)
Jul 26 16:31:59 METIS cron[1287]: (username) ORPHAN (no passwd entry)My system (METIS) is using ldap which works without problems for normal use but when used with cron @reboot it cannot find the user, probably because ldap or the network is not yet started when cron is executing the @reboot command.
I found a patch for debian which changes the cron.init file. Although Ubuntu and Debian are related, I cannot find a cron.init file on Ubuntu 19.04
On Ubuntu, can cron be forced to run AFTER the system has been set up to work for all users? How?
5 Reset to default