E
E
Evgeniy2020-02-22 01:17:23
linux
Evgeniy, 2020-02-22 01:17:23

How to set up automatic execution of commands on a Debian 9 VPS server?

Hello everyone

Such a task:
You need to set up an automatic restart of the server, and the execution of update commands, every day at 3 am Moscow time. How can I do that?

Let, for example, the update commands be just apt update, apt upgrade
The order is as follows: Run the commands, reboot

A couple of days I started to study working with VPS, I can’t figure out where to dig, please tell me

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
ky0, 2020-02-22
@Zheleznov

echo "0 3 * * *   root   apt update ; apt -y upgrade ; reboot" >> /etc/crontab

M
Mikhail Vasilyev, 2020-02-22
@vasilyevmn

blog.sedicomm.com/2017/07/24/kak-dobavit-zadanie-v...

A
Alexey Dmitriev, 2020-02-24
@SignFinder

man cron
man crontab
man 5 crontab

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question