Computing.Net > Forums > Linux > How to run a script at certain time

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to run a script at certain time

Reply to Message Icon

Name: Nancy
Date: August 1, 2003 at 13:58:08 Pacific
OS: Linux
CPU/Ram: NA
Comment:

Hi: there!

I want to run certain scripts at certain time, say 10:00 send email to myself to remind something. But I don't know how to let the OS to run the script at the specified time. Any suggestions?
Thanks a lot

Nancy



Sponsored Link
Ads by Google

Response Number 1
Name: Don Arnett
Date: August 1, 2003 at 14:20:11 Pacific
Reply:

You use cron to do this. The command "crontab -e" allows you to edit the cron file.

Adding the following line to the cron file would cause the script "/dirpath/myscript.sh" to execute every day at 10:00.

0 10 * * * /dirpath/myscript.sh >/dev/null


0 is the minute
10 is the hour
the three * add up to 'every day'

Use 'man crontab' for more details.


0

Response Number 2
Name: 3Dave
Date: August 4, 2003 at 04:25:04 Pacific
Reply:

You can alo use the "at" command for
one-off things (cron would be better for a
recurring job)
$ at 22:00
type commands ended by Ctrl&D

The commands will now be run at 10pm (and
then forgotten about)


0

Response Number 3
Name: nancy
Date: August 5, 2003 at 09:26:22 Pacific
Reply:

Thanks a lot.

Nancy


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: How to run a script at certain time

To run a program at the time of booting www.computing.net/answers/linux/to-run-a-program-at-the-time-of-booting/1957.html

How to run GUI app. on diskless client www.computing.net/answers/linux/how-to-run-gui-app-on-diskless-client-/7494.html

How to run .sh script file? www.computing.net/answers/linux/how-to-run-sh-script-file/23572.html