![]() |
|
|
|
|
|||||||
| 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 |
| i want a script to execute if the time is 12:00 automatically | lakshmananindia | UNIX for Advanced & Expert Users | 2 | 09-04-2007 01:22 PM |
| Can we launch a shell script automatically upon ssh login? | rockysfr | UNIX for Advanced & Expert Users | 1 | 07-02-2007 07:48 PM |
| Script to automatically change password. | rahulrathod | Shell Programming and Scripting | 1 | 10-04-2004 05:33 AM |
| Script to find PID and kill automatically | ST2000 | Shell Programming and Scripting | 4 | 08-01-2002 07:38 AM |
| How to run a script automatically ????? | arunava_maity | UNIX for Dummies Questions & Answers | 7 | 05-02-2001 07:37 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
how to run a Script automatically
How to make a script run automatically using a cron??
i do not know abt cron...... if i have simple.sh file and i need this to run everyday at a particular time what needs to be done thanks in advance |
| Forum Sponsor | ||
|
|
|
||||
|
See this link: cron and crontab
|
|
|||
|
Cron Jobs Usage
================================================= 1. Create a Script that you want to run as a CronJob 2. Assign the Script for the CRONTAB (CRONTAB would be differ from each user. So if you want to create a tab for the other user log-on as that user) crontab -e ==> Command to edit the crontab -e (edit user's crontab) -l (list user's crontab) -r (delete user's crontab) 3. Crontab Syntax: crontab [ -u user ] file <MIN> <HOUR> <DAY_OF_WEEK> <MONTH> <YEAR> <SCRIPT_NAME> 4. Examples 30 9-17 * 1 sun,wed,sat echo `date` >> /date.file 2>&1 At half past the hour, between 9 AM and 5 PM, for every day of January which is Sunday, Wednesday or Saturday, append date to file date.file 0 23-7/2,8 * * * date Every two hours from 11p.m. to 7a.m., and at 8a.m. 0 4 1 jan * date 4:00 a.m. on january 1st To take the physical database backup every day: 15 23 * * * /home/z755692/scripts/makeDbBackup.sh >> /tmp/DBBACKUP/bkup.log Reference: ========== http://www.pantz.org/os/linux/programs/cron.shtml |
|||
| Google UNIX.COM |