当前位置:网站首页>Modify the contents of /etc/crontab file directly, and the scheduled task will not take effect
Modify the contents of /etc/crontab file directly, and the scheduled task will not take effect
2022-06-27 08:25:00 【Yabingshi】
direct writing /etc/crontab Document content is invalid .
service crond reload/restart It doesn't work .
direct writing crontab When you file , You need to specify the executing user , And the top environment variable Can't delete .
Such as :
# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
*/1 * * * * root date > /root/test.txt
If no running user is specified in the scheduled task , Such as :
*/1 * * * * date > /root/test.txt
This command will not be executed .
Reproduced in :https://blog.51cto.com/zhangxingnan/1609879
边栏推荐
- All tutor information on one page
- [batch dos-cmd command - summary and summary] - environment variables, path variables, search file location related instructions - set, path, where, what if there are spaces in the path parameters of
- No matter how good LCD and OLED display technologies are, they cannot replace this ancient display nixie tube
- 正确的理解MySQL的MVCC
- 【13. 二进制中1的个数、位运算】
- 游戏资产复用:更快找到所需游戏资产的新方法
- Redis五种基本类型
- Five basic types of redis
- MATLAB小技巧(19)矩阵分析--主成分分析
- oracle用一条sql查出哪些数据不在某个表里
猜你喜欢

Ue5 magic power - POI solution

oracle用一条sql查出哪些数据不在某个表里

Understanding mvcc in MySQL transactions is super simple

MySQL锁详解

Ready to migrate to the cloud? Please accept this list of migration steps

Preliminary understanding of C #

Blind survey shows that female code farmers are better than male code farmers

Lvgl GUI guide porting code to stm32

MATLAB小技巧(18)矩阵分析--熵权法

【c ++ primer 笔记】第4章 表达式
随机推荐
【13. 二进制中1的个数、位运算】
JS EventListener
关于放大器失真的原因你了解多少呢?
RockerMQ消息发送模式
Mapping of Taobao virtual product store opening tutorial
C how to call line and rows when updating the database
针对直播痛点的关键技术解析——首帧秒开、清晰度、流畅度
JVM常见的垃圾收集器
[batch dos-cmd command - summary and summary] - environment variables, path variables, search file location related instructions - set, path, where, what if there are spaces in the path parameters of
[batch dos-cmd command - summary and summary] - output / display command - echo
Understanding mvcc in MySQL transactions is super simple
Pin details in rust
Futures reverse Documentary - training for traders
【批处理DOS-CMD命令-汇总和小结】-批处理命令中的参数%0、%1、%2、%[0-9]、%0-9和批处理命令参数位置切换命令shift,dos命令中操作符%用法
MySQL锁详解
索引+sql练习优化
JS EventListener
闭包问题
[batch dos-cmd command - summary and summary] - how to distinguish the internal command and external command of CMD, and the difference between CMD command and run (win+r) command,
05 observer mode