crontab -e 异常
大家好,我的一个脚本用crontab定时运行,我做了如下操作:
1. crontab -e
2. 添加内容 1 * * * * /home/my_path/getIp.sh (每小时的第一分钟执行)
3. wq 保存
头几个小时挺稳定的,后来就不执行了,我用crontab -e 看了一下,里面多了几千行很多东西,而且我添加的任务也被冲掉了,crontab -e 显示如下:
s file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# Edit this file to introduce tasks to be run by cron.
# Edit this file to introduce tasks to be run by cron.
# Edit this file to introduce tasks to be run by cron.
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
。。。。。。
后面还有几千行
请问这是怎么回事啊,我的操作方法不对吗,请帮忙指教一下,谢谢大家了!
1. crontab -e
2. 添加内容 1 * * * * /home/my_path/getIp.sh (每小时的第一分钟执行)
3. wq 保存
头几个小时挺稳定的,后来就不执行了,我用crontab -e 看了一下,里面多了几千行很多东西,而且我添加的任务也被冲掉了,crontab -e 显示如下:
s file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# Edit this file to introduce tasks to be run by cron.
# Edit this file to introduce tasks to be run by cron.
# Edit this file to introduce tasks to be run by cron.
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
。。。。。。
后面还有几千行
请问这是怎么回事啊,我的操作方法不对吗,请帮忙指教一下,谢谢大家了!
...全文
相关推荐
crontab每10秒执行一次的实现方法
- 打开crontab文件进行编辑: ```bash crontab -e ``` - 添加以下内容: ``` * * * * * /path/to/your/script.sh ```这样,虽然脚本本身是由
利用Linux中的crontab实现分布式项目定时任务功能
{ logger.error("topic定时器执行异常 " + type, e); result.setMsg("topic定时器执行异常 " + type); result.setSuccess(
Python + selenium + crontab实现每日定时自动打卡功能
**打开crontab编辑器**: ```bash crontab -e ```2.
crontab –e使用实操
Crontab 命令Crontab 提供了多种命令来管理 Crontab 文件。
linux 用户任务定时器配置 crontab -e 编辑的文本
linux 配置定时任务, crontab -e编辑的文本,用户任务定时器配置,目录位置在 /var/spool/cron中的root文件中


系统维护与使用区
