LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-07-2006, 01:33 PM   #1
hraposo
Member
 
Registered: Aug 2004
Posts: 370

Rep: Reputation: 30
Run a script every 10 minutes


I want run a script every 10 minutes I created a file names dyndns em:
/etc/cron.d
An I put that line:
0, 10, 20, 30, 40, 50 * * * * root /etc/ppp/ip-up.d/dyndns_update.sh >/dev/null 2>&1 But the script don't run. Why?
 
Old 11-07-2006, 08:51 PM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
If you're sure that the syntax is already correct, first you must at least know if the script runs but just immediately bails out. Add a line similar to this in the beginning of the script. Check if a file is created.

cat /dev/null > /tmp/file

If a file is created, it should be a problem with the script. You can post the script here so that others can also see it if you like.
 
Old 11-08-2006, 05:39 AM   #3
hraposo
Member
 
Registered: Aug 2004
Posts: 370

Original Poster
Rep: Reputation: 30
The cron.d is running the script is running to because when I execute the script in terminal there's no problem. The only problem can be this line 0, 10, 20, 30, 40, 50 * * * * root /etc/ppp/ip-up.d/dyndns_update.sh >/dev/null 2>&1
 
Old 11-08-2006, 06:44 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
AFAIK there should be spaces: "0,10,20,30,40,50".
Using "*/10" notation saves you typing twelve chars.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
firewall script works for few minutes Niceman2005 Linux - Security 6 07-25-2006 02:36 AM
howto run a script from cron every 5 minutes except 11pm-8am ? cccc Programming 2 03-20-2005 03:52 AM
how to run a program every x minutes? Goala Linux - General 5 08-06-2004 01:22 PM
on Network Up Script run? On Battery power run script? v2-ncl Linux - General 0 12-08-2003 09:34 AM
a script that runs every 5 minutes? zovres Linux - Newbie 5 08-19-2003 12:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration