当前位置:网站首页>直接修改/etc/crontab 文件内容,定时任务不生效
直接修改/etc/crontab 文件内容,定时任务不生效
2022-06-27 08:08:00 【雅冰石】
直接写/etc/crontab 文件内容不生效。
service crond reload/restart 也不生效。
直接写crontab文件时,需要指定执行用户,并且上面的环境变量不能删除。
如:
# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
*/1 * * * * root date > /root/test.txt
如果定时任务中不指定运行用户,如:
*/1 * * * * date > /root/test.txt
则不会执行此条命令。
转载于:https://blog.51cto.com/zhangxingnan/1609879
边栏推荐
- All tutor information on one page
- 关联GIS:条条道路通UE5城
- Futures reverse Documentary - training for traders
- The IPO of Yefeng pharmaceutical was terminated: Yu Feng, the actual controller who had planned to raise 540million yuan, made P2P investment
- 【10. 差分】
- Helix QAC is updated to 2022.1 and will continue to provide high standard compliance coverage
- LVGL GUI GUIDER移植代码到STM32
- js成绩奖惩例题
- 【12. 最大连续不重复子序列】
- C how to call line and rows when updating the database
猜你喜欢

c#的初步认识

Filter filter

Experience record of Luogu's topic brushing

Rust async: SMOL source code analysis -executor

Online text digit recognition list summation tool
![[13. number and bit operation of 1 in binary]](/img/53/024f9742d1936fe6f96f4676cea00e.png)
[13. number and bit operation of 1 in binary]

Linux下Redis的安装

PayPal account has been massively frozen! How can cross-border sellers help themselves?
![[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,](/img/d1/b7e70e6f0be8e128f38afbe7ac927c.png)
[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,

SPARQL基础入门练习
随机推荐
野風藥業IPO被終止:曾擬募資5.4億 實控人俞蘠曾進行P2P投資
win命令行中导入、导出数据库相关表
How to view program running time (timer) in JS
JS to judge the odd and even function and find the function of circular area
Implementation principle of similarity method in Oracle
ACM课程学期总结
[12. maximum continuous non repeating subsequence]
【批处理DOS-CMD命令-汇总和小结】-cmd的内部命令和外部命令怎么区分,CMD命令和运行(win+r)命令的区别,
L'introduction en bourse de Wild Wind Pharmaceutical a pris fin: Yu pinzeng, qui avait l'intention de lever 540 millions de RMB, a effectué un investissement P2P.
分析日志.log
游戏六边形地图的实现
ACM course term summary
洛谷刷题心得记录
c的时间函数算效率
若xn>0,且x(n+1)/xn>1-1/n(n=1,2,...),证明级数∑xn发散
How can I import data from Oracle into fastdfs?
JS use the switch statement to output the corresponding English day of the week according to 1-7
c#的初步认识
JS to determine whether the result is qualified, the range is 0-100, otherwise re-enter
[c++ primer notes] Chapter 4 expression