Sunday, 11 August 2013

Run crontab non-interactively from script

Run crontab non-interactively from script

I would like to schedule some tasks on remote servers by script but am
having an issue with crontab expecting to be run interactively the first
time. As far as I understand crontab needs to be initialized by first
running crontab -e. Which causes it to prompt which editor to use and
launch that editor.
I need initialize crontab and schedule a task on too many servers to log
into each individually. Is there a way I can avoid the interactive part or
script it?
The servers and my client are running Ubuntu 13.04.

No comments:

Post a Comment