Ssh cronjob schedule with command line

I am using amazonaws es3 server. I want to schedule my cron with the command line. I use this command to schedule a cron job

at -f shellscript.sh -v 18:30

but it will be scheduled only once, when I want to configure manually as once a day or every five minutes.

Please help with the team, which team should I use

Thnaks,

+7
source share
3 answers

As @ The.Anti.9 noted, such a question is suitable for Serverfault. To answer your question, crontab is a bit more powerful than "at" and gives you more flexibility since you can run the task repeatedly, for example, daily, weekly, monthly.

For example, for your example, if you need to run the script every day at 18:30, you will do this,

$ crontab -e 

then add the following

 30 18 * * * /path/to/your/script.sh 

save, and you're done.

Note: 30 18 indicates the time is 18:30, and * s indicates that it should start every day of every month). If you need to run it on a specific day of the month, just check it on the crontab man page,

+3
source

Does crontab -e work? and generating the crontab code http://www.openjs.com/scripts/jslibrary/demos/crontab.php should help.

+1
source

You can use the crontab -e command to edit the scheduled cron execution. A good explanation of how to set the time can be found on the Ubuntu forum

0
source

All Articles