why isnt cron working?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting why isnt cron working?
# 1  
Old 12-09-2008
why isnt cron working?

I am using Ubuntu linux desktop, and I am trying to schedule a sheel script to run every 10minutes.

These are the steps I have taken:

Code:
crontab -e

added and saved this line to the file
Code:
# m h  dom mon dow   command
*/1 * * * * /home/enzo/Desktop/dlrecentuse

restarted cron:
Code:
 sudo /etc/init.d/cron restart

nothing is happening, any ideas?

Last edited by daydreamer; 12-09-2008 at 04:16 PM..
# 2  
Old 12-09-2008
Code:
*/1 * * * * /home/enzo/Desktop/dlrecentuse

That doesnt make sense.

* * * * * /home/enzo/Desktop/dlrecentuse

That runs every minute.

Code:
*/10 * * * * /home/enzo/Desktop/dlrecentuse

Runs every 10 minutes

You dont have to restart cron after changin.

Look in cron log in /var/log to see if there are any errors.
# 3  
Old 12-09-2008
o ok thanks for the help.. ive got the cron task running now, but just need to sort out my script.

i thought */1 would run every other minute!
# 4  
Old 12-09-2008
*/2 would be every 2 mins, */5 every 5 mins...etc...
# 5  
Old 12-09-2008
thanks all working now.
# 6  
Old 12-09-2008
I have a related question if you know -
if */10 is every 10 - is it on 00, 10, 20 etc?

what if you want to run every 10 mins starting on 02 - 02, 12, 22, etc?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep -w ip address from a file isnt working need help

I have a file "file1" that contains several ip address , and the "file2" contains several records , each line in file2 contains somewhere the ip address that i am searching in the file1 I use the unix command grep -w for i in `cat file1` do grep -w "$i" file2 >> file3 done ... (9 Replies)
Discussion started by: knijjar
9 Replies

2. SuSE

Cron not working

Hi, It is SLES 10.3 VM. Suddenly cron stopped working on this and I am not able to figure out, where it is failing. It is not running with even root. I gave a simple job of redirection of 'date' command, that also doesn't work. Can somebody help me to fix this ? vmprdt23:~ # ps -ef | grep -i... (4 Replies)
Discussion started by: solaris_1977
4 Replies

3. Shell Programming and Scripting

Script not working in cron but working fine manually

Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered. The script is as follow: #!/bin/sh for file in file_1.txt file_2.txt file_3.txt do awk '{ print "0" }' $file > tmp.tmp mv tmp.tmp $file done And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies

4. Shell Programming and Scripting

Script is not working from cron while working manually

Hello, I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me 1) How could I check my script when it is running from cron like... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

5. Shell Programming and Scripting

Code to remove files when corresponding file doesnt exist isnt working.

I am trying to add some code to the begging of a script so that it will remove all the .transcript files, when their is no coressponding .wav file. But it doesnt work. This is the code I have added: for transcriptfile in `$voicemaildir/*.transcript`; do wavfile=`echo $transcriptfile | cut -d'.'... (2 Replies)
Discussion started by: ghurty
2 Replies

6. Solaris

cron not working.

I have a script monitor.sh the path is /netmon/bin/monitor.sh when i run this script as sh /netmon/bin/monitor.sh it runs completely fine. but when i include it in crontab , it does not run my cron entry is 0,5,10,15,20,25,30,35,40,45,50,55 * * * *... (11 Replies)
Discussion started by: asalman.qazi
11 Replies

7. UNIX for Dummies Questions & Answers

Cron not working

I created a file in /u01/oradata directory as cronjb.ksh which contains following script 30 12 * * * /export/home/oracle/u01/oradata/rman.ksh '/export/home/oracle' is my root directory. I then moved cronjb.ksh file to my '/export/home/oracle' directory. i typed crontab cronjb.ksh. However my... (1 Reply)
Discussion started by: manna
1 Replies

8. UNIX for Dummies Questions & Answers

Cron not working?

Hello I have a mac os x server machine that I have setup a cron to run a php file using wget and cron doesn't seem to work. I have setup cron on other mac's before and they have all worked. Also I know wget works because I have tested it. Is there anything else I should try? I do crontab -e and... (5 Replies)
Discussion started by: christo16
5 Replies

9. UNIX for Dummies Questions & Answers

cron not working

Cron does not seem to work with this crontab. Any ideas? # run-parts # commands to execute every hour 01 * * * * root run-parts /etc/cron.hourly # commands to execute every day 02 4 * * * root run-parts /etc/cron.daily # commands to execute every week 22 4 * * 0 root run-parts... (1 Reply)
Discussion started by: DaleCabell
1 Replies

10. Shell Programming and Scripting

Why passwd isnt working in shell scripts?

I had to write a script to change my login password, and the script wasnt working fine. When I searched through the previous postings in this forum, I got the solution (using 'expect' tool). But I would like to know why passwd command isnt working in scripts? (1 Reply)
Discussion started by: Deepa
1 Replies
Login or Register to Ask a Question