为什么使用vim时在OS X上没有crontab条目? [英] Why I've got no crontab entry on OS X when using vim?
本文介绍了为什么使用vim时在OS X上没有crontab条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的Mac上使用cron。我选择它 launchd
,因为我想在Linux上也能使用我的新知识。但是,我似乎不能得到 crontab -e
命令工作。它触发vim,进入我的测试工作:
I would like to use cron on my Mac. I choose it over launchd
, because I want to be able to use my new knowledge on Linux as well. However, I cannot seem to get the crontab -e
command to work. It fires up vim, I enter my test job:
0-59 * * * * mollerhoj3 echo "Hello World"
但是保存并退出(:wq
)后,
But after saving and quitting (:wq
),
crontab -l
说:
No crontab for mollerhoj3
我做错了什么?
推荐答案
:
- 在航站楼:
crontab -e
。 - 按 i 进入vim的插入模式。
-
键入您的cron作业,例如:
- In Terminal:
crontab -e
. - Press i to go into vim's insert mode.
Type your cron job, for example:
30 * * * * /usr/bin/curl --silent --compressed http://example.com/crawlink.php
按 Esc 退出vim的插入模式。
Press Esc to exit vim's insert mode.
根据您的〜/ .vimrc
文件的内容,这可能不工作。
Note however that this might not work depending on the content of your ~/.vimrc
file.
这篇关于为什么使用vim时在OS X上没有crontab条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文