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.
精彩评论