![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My script is not running | manna | UNIX for Dummies Questions & Answers | 8 | 01-05-2008 12:11 PM |
| Running KSH script In SFU | ilak1008 | Windows & DOS: Issues & Discussions | 2 | 05-23-2007 11:17 PM |
| running cd from a script | SkySmart | Shell Programming and Scripting | 5 | 03-08-2007 08:07 PM |
| when running my script below | vbslim | Shell Programming and Scripting | 5 | 01-03-2006 08:11 PM |
| Running a script from CDE... | kristy | UNIX for Dummies Questions & Answers | 4 | 09-05-2001 07:33 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Im new to Unix - Very new.
Ive to write a script and the script has to run at 7.45pm every day monday to friday. How do i do this? |
| Forum Sponsor | ||
|
|
|
||||
|
check out cron, whick is the unix scheduler. It should do the trick for you. From the command line man cron
Read More Cron This file is an introduction to cron, it covers the basics of what cron does,and how to use it. What is Cron? Cron is the name of program that enables unix users to execute commands or scripts (groups of commands) automatically at a specified time/date. It is normally used for sys admin commands, like makewhatis, which builds a search database for the man -k command, or for running a backup script, but can be used for anything. A common use for it today is connecting to the internet and downloading your email. minute hour dom month dow user cmd # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly minute This controls what minute of the hour the command will run on, and is between '0' and '59' hour This controls what hour the command will run on, and is specified in the 24 hour clock, values must be between 0 and 23 (0 is midnight) dom This is the Day of Month, that you want the command run on, e.g. to run a command on the 19th of each month, the dom would be 19. month This is the month a specified command will run on, it may be specified numerically (0-12), or as the name of the month (e.g. May) dow This is the Day of Week that you want a command to be run on, it can also be numeric (0-7) or as the name of the day (e.g. sun). user This is the user who runs the command. cmd This is the command that you want run. This field may contain multiple words or spaces. If you don't wish to specify a value for a field, just place a * in the field. |