Hi,
I am trying to create a crontab file for one user which must be replicated across sevaral servers, I want to script this;
This is what I have, is there a better way?
echo "newuser" >> /etc/cron.d/cron.allow
touch /var/spool/cron/crontabs/newuser
chown -R root:sys /var/spool/cron/crontabs/newuser
echo "45 23 * * * $HOME/bin/log.ksh 0 0,2,4,6,8,10,12,14,16,18,20,22 * * *" /var/spool/cron/crontabs/newuser
I think if I could do a
echo "newuser" >> /etc/cron.d/cron.allow
crontab -e newuser
Insert the job & fall back out of the shell, this would be neater... can anyone suggest?
I am trying to create a crontab file for one user which must be replicated across sevaral servers, I want to script this;
This is what I have, is there a better way?
echo "newuser" >> /etc/cron.d/cron.allow
touch /var/spool/cron/crontabs/newuser
chown -R root:sys /var/spool/cron/crontabs/newuser
echo "45 23 * * * $HOME/bin/log.ksh 0 0,2,4,6,8,10,12,14,16,18,20,22 * * *" /var/spool/cron/crontabs/newuser
I think if I could do a
echo "newuser" >> /etc/cron.d/cron.allow
crontab -e newuser
Insert the job & fall back out of the shell, this would be neater... can anyone suggest?