Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-07-2006, 01:33 PM
|
#1
|
Member
Registered: Aug 2004
Posts: 370
Rep:
|
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?
|
|
|
11-07-2006, 08:51 PM
|
#2
|
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
|
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.
|
|
|
11-08-2006, 05:39 AM
|
#3
|
Member
Registered: Aug 2004
Posts: 370
Original Poster
Rep:
|
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
|
|
|
11-08-2006, 06:44 AM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,417
|
AFAIK there should be spaces: "0,10,20,30,40,50".
Using "*/10" notation saves you typing twelve chars.
|
|
|
All times are GMT -5. The time now is 10:19 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|