系统环境:Kali GNU/Linux Rolling

#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

相关文章

「Cron」- 创建周期任务
「Cron」- 执行日志
「Cron」- 使用技巧
「Cron and Anacron」- 杂记
「crontab」- 周期任务的配置文件

相关文章:

  • 2022-12-23
  • 2021-11-18
  • 2021-11-20
  • 2022-01-21
  • 2021-11-11
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2021-12-02
  • 2021-10-02
  • 2021-12-16
  • 2021-09-21
  • 2021-11-23
  • 2022-12-23
相关资源
相似解决方案