0

I want to say I am a complete newbie but I want a shell script that will execute a command on a specific time for example on 6:45 am

How is this done, a full example would be very useful! Thank you!

Martin Zeltin
  • 5,233
  • 9
  • 34
  • 40
  • You may have what you want here at [how-do-i-set-up-a-cron-job](http://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job/) – sourav c. Nov 07 '13 at 16:41

1 Answers1

2

You want to use cron.

You create schedules within your crontab (crontab -e). The syntax of how to do that can be seen here.

If you wanted to clear /tmp/ at 6:45 AM every day you'd have something like the following in your crontab:

45 6 * * * /bin/rm -rf /tmp/*