I am using the amazonaws es3 server.I want to schedule my cron with command line. I am using the this command for scheduling the cron job
at -f shellscript.sh -v 18:30
but it will schedule for only one time i want to configure manually like once a day or every five minutes .
Please help with command which command i have to used
Thnaks,
Creating a Cron Job First, open the Terminal (if using Linux) or Putty (if using Windows). Next, login with your SSH username & password that we sent to you. This will open a file for you where you will be able to add the Cron Job you would like to run.
9.To schedule a Cron job beginning of every month using @monthly It is as similar as the @yearly as above. But executes the command monthly once using @monthly cron keyword. This will execute the shell script tape-backup at 00:00 on 1st of every month.
As @The.Anti.9 noted, this kind of question fits in Serverfault. To answer your question, crontab is a little more powerful than 'at' and gives you more flexibility as you can run the job repeatedly for instance daily, weekly, monthly.
For instance for your example, if you need to run the script every day at 18:30 you'd do this,
$ crontab -e
then add the following
30 18 * * * /path/to/your/script.sh
save and you are done.
Note: 30 18 indicates time 18:30, and *s indicate that it should run every day of every month) If you need to run it on a particular day of the month just check it out on the man page of crontab.
Doesn't crontab -e work? and to generate crontab code http://www.openjs.com/scripts/jslibrary/demos/crontab.php should help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With