「Cron」- 安裝及注意事項 @20210418

系統環境:Kali GNU/Linux Rollingide

#1 安裝服務

#!/bin/sh

# 安裝Cron服務:
apt-get install cron

# 啓動並開機自啓動Cron服務:
systemctl enable cron
systemctl start cron

# 查看服務狀態:
systemctl status cron

# 若是手動啓動Cron服務能夠執行:
cron &

# 推薦使用systemd的方式來啓動cron服務。

#2 啓動服務

#!/bin/sh

# 安裝服務
apt-get install cron

# 啓動並開機自啓動服務
systemctl enable cron
systemctl start cron

# 若是手動啓動Cron服務能夠執行:
cron &

# 推薦使用systemd的方式來啓動cron服務。

#3 查看服務狀態

# 查看服務狀態:
systemctl status cron
相關文章
相關標籤/搜索