- This topic is empty.
- AuthorPosts
-
December 7, 2011 at 8:43 am #9641
gaurav
ParticipantI 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 jobat -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,
December 7, 2011 at 8:50 am #9642kfirbreger
ParticipantYou can use the command
crontab -e
to edit your cron planned execution. A good explanation on how to set the time can be found on the Ubuntu forumDecember 7, 2011 at 8:52 am #9643nitesh
ParticipantDoesn’t crontab -e work?
and to generate crontab code http://www.openjs.com/scripts/jslibrary/demos/crontab.php should help.December 7, 2011 at 9:07 am #9644kibet-yegon
ParticipantAs @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.
- AuthorPosts
- You must be logged in to reply to this topic.