The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
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

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-28-2003
Registered User
 

Join Date: Dec 2003
Posts: 17
Exclamation Running a script.

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
  #2 (permalink)  
Old 12-28-2003
google's Avatar
Moderator
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
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.
  #3 (permalink)  
Old 12-29-2003
Registered User
 

Join Date: Dec 2003
Posts: 17
Thumbs up

Turns out im using autosys to run this job anyway!!!
Google UNIX.COM
Closed Thread

Tags
autosys

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:49 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0