Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux scheduling tasks

Shulou Source: shulou.com Published: 2022-06-02 10:59:55 10月05日 Update

Set up one-time scheduled tasks: at time

Check that the task is not currently executed: at-l

Delete one-time scheduled task: atrm task serial number

[root@linuxprobe ~] # at 23:30

At > systemctl restart httpd

At > Please press Ctrl+d at the same time here to finish writing the planning task

Job 3 at Mon Apr 27 23:30:00 2015

[root@linuxprobe ~] # at-l

3 Mon Apr 27 23:30:00 2016 a root

[root@linuxprobe ~] # echo "systemctl restart httpd" | at 23:30

Create repetitive scheduled tasks

Edit crontab-e

View crontab-l

Delete crontab-r

Set the parameter format of the crond service, "minute, hour, day, month, week command"

[root@master1-192,168117-18] # crontab-e

25, 3, 1, 3, usr/bin/tar, 5 / usr/bin/tar-czvf backup.tar.gz / home/wwwroot

Tags: Task one-time parameter simultaneous command serial number time week format service Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information OPPO Reno Linux Shulou Tech Info Xiaomi