Skip to content

Commit 4cd05fc

Browse files
committed
新增定时任务at的说明
1 parent 059657f commit 4cd05fc

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

Linux.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,21 @@ SELinux 全称 Security Enhanced Linux (安全强化 Linux)
689689

690690
关闭反向解析
691691
```bash
692-
# vim /etc/ssh/sshd_config
692+
vim /etc/ssh/sshd_config
693693
```
694694
设置 UseDNS no
695695
```bash
696-
# service sshd restart
696+
service sshd restart
697+
```
698+
699+
700+
## at
701+
702+
定时任务
703+
```bash
704+
echo `date`
705+
at now + 1 minute <<< "/bin/echo `date` > /tmp/time.log"
706+
at now + 10 minutes <<< "/bin/echo `date` > /tmp/time.log" # 创建任务
707+
at -l # 列出任务
708+
at -c 1 # 显示任务内容
697709
```

0 commit comments

Comments
 (0)