crontab 导入文件
一般用crontab用-e调出vi来编写,但是在实际工作中经常有这种情况是,在测试时候编好了crontab文件,需要导入到生产机器上去,实际上,用
crontab filename
就直接可以了
lege@debian-test:~$ crontab -l
no crontab for lege
lege@debian-test:~$ vim cronfile
lege@debian-test:~$ cat cronfile
*/1 * * * * logger legeishere
lege@debian-test:~$ crontab cronfile
lege@debian-test:~$ crontab -l
*/1 * * * * logger legeishere