Linux定时任务Crontab使用 提示no crontab for root

时间:2018-11-14 01:08:32   收藏:0   阅读:1097

 

crontab -e

输出如下

no crontab for f - using an empty one

Select an editor.  To change later, run select-editor.
  1. /bin/ed
  2. /bin/nano        <---- easiest
  3. /usr/bin/vim.tiny
Choose 1-3 [2]: 3
crontab: installing new crontab
 

然后就会打开一个文件,什么都不用做,直接保存,保存方式类似vim

再次crontab -l ,就会显示出定时任务了

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!