Best way to schedule script to run Ubuntu 10.04


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Best way to schedule script to run Ubuntu 10.04
# 1  
Old 02-04-2011
Best way to schedule script to run Ubuntu 10.04

On Ubuntu 10.04 LTS, I would like to know the best way to schedule myscript.sh to run at a specified time, please provide examples and specify things like does cron have to be running, how do I check if cron is running and all that. I have tried unsuccessfully in the past to run the AT command, and would like to see a real world example.
# 2  
Old 02-04-2011
cron is how you will do it. as you do a crontab -e to edit the cron.
first do a man cron to see how to do the entries.
a line will look something like:
Code:
0 15 * * *  /usr/lib/ras/dumpcheck >/dev/null 2>&1
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/sbin/dumpctrl -k >/dev/null 2>/de v/null

the 1st one runs at 1500 hrs the second is running every 5 min

Last edited by Scott; 02-05-2011 at 08:31 AM.. Reason: Code tags
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How do you schedule a job to run at 3:45 am every morning in UNIX?

give the suggestion (3 Replies)
Discussion started by: sonu pandey
3 Replies

2. Shell Programming and Scripting

How do you schedule a job to run at 3:45 am every morning?

help me (2 Replies)
Discussion started by: sonu pandey
2 Replies

3. Shell Programming and Scripting

Schedule and Run By weekly shell script in cronjob

Hi All, How to schedule a shell script(script name- byweeklyreport.sh) it should run by weekly in corn job or is there any script have to write to check week and then run the above script. example-1st run March 06 2013 2nd run March 20 2013 3rd run April 3 2013... (13 Replies)
Discussion started by: krupasindhu18
13 Replies

4. AIX

job run before schedule on crontab

Guys, yesterday i just make a script with email as a result and put them into crontab, it will execute on 23.33. Today, i recieved email from system twice as result the script. the first email send at 23.02 and the second send at 23.33 how is the script execute two times ? the first job run... (6 Replies)
Discussion started by: michlix
6 Replies

5. Shell Programming and Scripting

Schedule a script to run at 10am from mon to fri

Hi, I need to write a shell script which will run i background and will execute other script only on Mon to Fri 10 AM but not on Sat and Sun. I am able to set it to run on every day at 10AM but how to make it to run only on Mon to Fri Thanks, Firestar. (7 Replies)
Discussion started by: firestar
7 Replies

6. Shell Programming and Scripting

How to schedule a cronjob to run every 15 mins ?

Hi, I want to schedule a job to run every 15 mins through cron. searched the forums and came up with this piece of code.i have given this in my crontab 0-59/15 * * * * sh /usr/ss/job But its not being run. Have i made any mistake here. Can any1 post the cron code for scheduling the... (5 Replies)
Discussion started by: suresh_kb211
5 Replies

7. Shell Programming and Scripting

General Q: how to run/schedule a php script from cron jobs maybe via bash from shell?

Status quo is, within a web application, which is coded completely in php (not by me, I dont know php), I have to fill out several fields, and execute it manually by clicking the "go" button in my browser, several times a day. Thats because: The script itself pulls data (textfiles) from a... (3 Replies)
Discussion started by: lowmaster
3 Replies

8. Solaris

Schedule to run every 3 minutes - CRONTAB

Hello all, I want to run a script every 3 minutes in os level and to send mail. I scheduled in crontab as 3 * * * * /mnt1/monitorscripts/testdbstart.sh I got mail every one hour and I confirmed that the script is running every 1 hour which doesn't meet my requirment. Where I am... (4 Replies)
Discussion started by: prashanth_gs
4 Replies

9. Shell Programming and Scripting

set schedule to run a script at background while logout

Hi, How can I run a script at 9:00am and 6:00pm everyday? Can I run it at background while I logout my account? Please help!! Many Thanks!! (1 Reply)
Discussion started by: happyv
1 Replies

10. UNIX for Dummies Questions & Answers

How do you schedule a command to run at 4:00 every morning?

How do you schedule a command to run at 4:00 every morning? (1 Reply)
Discussion started by: JosephGerard
1 Replies
Login or Register to Ask a Question