H
H
HoShik2021-02-26 20:05:03
linux
HoShik, 2021-02-26 20:05:03

Why is the server not rebooting via cron?

Faced a problem, the server does not restart through the task created in cron

Looks like this

SHELL=/bin/bash
00 17 * * * shutdown -r 0

Cron log:
Feb 26 17:00:02 servername CRON[3602]: (root) CMD (shutdown -r 0)
Command output uptime
17:04:04 up 29 min, 1 user, load average: 0.00, 0, 00, 0.00
That is, as I understand it, the server did not restart. What's the trouble?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
galaxy, 2021-02-26
@HoShik

Start by writing full paths in crontabs:
00 17 * * * /sbin/shutdown -r 0

D
Dr. Bacon, 2021-02-26
@bacon

Start by not having to restart the server via cron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question