automatic restart  [SOLVED]

Locked
PuntonetSvb
Posts: 36
Joined: Thu 7. Apr 2022, 19:16

automatic restart

Post by PuntonetSvb »

I want to make my server restart every day at 2 in the morning, using scheduled tasks, it asks me for a command, I put reboot, sudo reboot, and it gives me an error, what command could I use?
User avatar
24unix
Posts: 2037
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: automatic restart

Post by 24unix »

You are not using Windows.

Why do you want to restart so often?
Cheers Micha
--
A Windows user reinstalls software every few weeks.
A Linux user reinstalls software every few weeks.
The difference is with Linux the version numbers change.
User avatar
Tobi
Community Moderator
Posts: 3230
Joined: Thu 5. Jan 2017, 13:24

Re: automatic restart  [SOLVED]

Post by Tobi »

The correct syntax is

Code: Select all

/sbin/reboot
reboot.png
reboot.png (4.34 KiB) Viewed 4866 times
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
alamis
Posts: 21
Joined: Sat 8. Oct 2022, 21:29

Re: automatic restart

Post by alamis »

Tobi wrote: Thu 13. Oct 2022, 19:50 The correct syntax is

Code: Select all

/sbin/reboot
reboot.png
And why sbin?
User avatar
24unix
Posts: 2037
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: automatic restart

Post by 24unix »

alamis wrote: Mon 31. Oct 2022, 19:34
Tobi wrote: Thu 13. Oct 2022, 19:50 The correct syntax is

Code: Select all

/sbin/reboot
reboot.png
And why sbin?

Code: Select all

# which reboot
/usr/sbin/reboot
And as of usermerge it's also available as /sbin/reboot
Cheers Micha
--
A Windows user reinstalls software every few weeks.
A Linux user reinstalls software every few weeks.
The difference is with Linux the version numbers change.
User avatar
Tobi
Community Moderator
Posts: 3230
Joined: Thu 5. Jan 2017, 13:24

Re: automatic restart

Post by Tobi »

alamis wrote: Mon 31. Oct 2022, 19:34 And why sbin?
because it works 😂
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
User avatar
BasHeijermans
KeyHelp Translator
Posts: 170
Joined: Mon 20. Jun 2022, 12:01
Location: Heppen Belgium
Contact:

Re: automatic restart

Post by BasHeijermans »

PuntonetSvb wrote: Thu 13. Oct 2022, 19:20 I want to make my server restart every day at 2 in the morning, using scheduled tasks, it asks me for a command, I put reboot, sudo reboot, and it gives me an error, what command could I use?
Why?

We Linux users are proud to show our uptimes, the longer the better.
We never reboot unless is absolutly needed, something like this is our goal:

Code: Select all

16:06:35 up 83 days,  2:57,  1 user,  load average: 1,58, 1,70, 1,72
And even that is short compared to a lot of others :lol:
Greetings Bas.

Ik heb KeyHelp naar het Nederlands vertaald, contacteer me als er translatie fouten zijn.
(I have translated KeyHelp into Dutch, contact me if there are translation errors.)
Next version 24 of KeyHelp 100% translated.
Locked