Is there a way to add lines to a user's cron via script?
I usually do it using crontab -e, but I would like to automate this task with a shell script.
You can echo the line in to the bottom of the current users crontab like this:
line="* * * * * /path/to/command"
(crontab -u userhere -l; echo "$line" ) | crontab -u userhere -
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
3 years ago
7 months ago