Linux系统配置及服务管理_计划任务

#简介:
作用: 计划任务主要是做一些周期性的任务,
目前最主要的用途是定期备份数据。
分为一次性调度执行 at      循环调度执行 cron
语法格式 示例
一分钟后建立11212.txt

[root@localhost ~]# at now +1min
at> touch 12212.txt
at> <EOT>
job 8 at Wed Aug  5 20:02:00 2020
[root@localhost ~]# ls
12121    12212.txt  anaconda-ks.cfg  dir2  dir4  etc-gzip.tar.gz  etc-xzip.tar.xz  tengine-2.3.2         yongqi
1212121  123.txt    dir1             dir3  etc   etc.tar          file1            tengine-2.3.2.tar.gz
[root@localhost ~]# 

查询

[root@localhost ~]# atq
1	Wed Aug  5 14:30:00 2020 a root
[root@localhost ~]# 

systemtel 命令用法
关闭程序crond

[root@localhost ~]# systemctl  stop crond
[root@localhost ~]# systemctl  status crond
● crond.service - Command Scheduler
   Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2020-08-05 14:57:24 CST; 5h 19min ago
  Process: 720 ExecStart=/usr/sbin/crond -n $CRONDARGS (code=exited, status=0/SUCCESS)
 Main PID: 720 (code=exited, status=0/SUCCESS)

Aug 05 09:07:06 localhost.localdomain systemd[</
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值