开发者

Crontab append remotely

I would like append entries to crontab on a remote server. Something like this.

for host in $hosts
do
ssh $host echo "5,10,15,20 05,35 8-20 * * * /myhome/myscript" crontab_fil开发者_StackOverflow社区e
done

problem is i do not know the name of the crontab file to which the line needs to be appended with


You should not edit crontab file directly, use always crontab -e (why? read this). But you could create a simple text file with your script and cut&paste into crontab.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜