3

Whenever I switch off my server, I need to start my cron service manually. I fired a command :-

sudo update-rc.d cron defaults

Upon firing the above command, it shows the following:-

update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match cron Default-Stop values (none)
insserv: warning: script 'K02printer' missing LSB tags and overrides
insserv: warning: script 'K02autossh_tunnel_x2' missing LSB tags and overrides
insserv: warning: script 'printer' missing LSB tags and overrides
insserv: warning: script 'autossh_tunnel_x2' missing LSB tags and overrides

When I restart the server and pgrep cron , no integer is being displayed. I need to sudo service cron start to start my cron manually.

How do I start the cron service on bootup.

Praful Bagai
  • 16,684
  • 50
  • 136
  • 267

1 Answers1

3

It looks like the service got disabled. You need to re-enable it with "update-rc.d cron enable". That should do the trick.

The other warnings are about different init scripts which lack their LSB header. You should look into those, too.

Rhonda
  • 93
  • 9
  • Will enabling solve the problem, I mean if the server re-starts again, will it enable itself on bootup?? PS: Though I've implemented it, I cannot check because its in a live enviorment, and I cannot restart my server without the prior consent of our customer. – Praful Bagai Oct 27 '14 at 17:35
  • You can check the runlinks before you do the update-r.cd enable call by doing "`ls /etc/rc*/*cron`" and take a look at what links are actually there. After you did the enable call there should see S links in the rc2.d through to rc5.d directories, and I suspect that those weren't there before you did the enable call. – Rhonda Oct 30 '14 at 07:00
  • I used this in reverse, to ```update-rc.d cron disable``` and it worked well. – Fiddy Bux Jan 26 '19 at 21:05