crontab -e 异常

wang_qiao_ying wang_qiao_ying 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
大家好,我的一个脚本用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
。。。。。。
后面还有几千行

请问这是怎么回事啊,我的操作方法不对吗,请帮忙指教一下,谢谢大家了!
...全文
评论 4
收藏 已收藏
分享
返回顶部