Cron in Scripts

How to Pass a Task to cron From a Script?

How to Pass a Task to cron From a Script?

You can use the following script to do this in scripts:

1crontab -l > taskcron
2echo "* * * * * sometask" >> taskcron
3crontab taskcron
4rm taskcron

アリメクタ’s Blog

Watch. Read. Run. Repeat.

World’s Best Company Ask Me First

The first rule of Fight Club is: "You do not talk about Fight Club."

The second rule of Fight Club is: "You do not talk about Fight Club!"