homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

How to setup this cron job?

 11:40 am on Oct 20, 2004 (gmt 0)

I was give this instruction:

setting a cron job to load the url using wget, or some other command line tool, every 10 - 15 minutes

The url being like: [mysite.com...] .

So what should I put in cron to have this loaded avery 15 minutes, and how can I check that it does its job correctly?

Thanks in advance,



 4:27 pm on Oct 20, 2004 (gmt 0)

The crontab entry would look like:

*/15 * * * * /home/joe/myscript

Then myscript should call wget and do whatever else is necessary.


 4:38 pm on Oct 20, 2004 (gmt 0)

There are issues between cron and php. Your ISP must be able to run php executables:



 5:08 pm on Oct 20, 2004 (gmt 0)

i'm trying with: something similar to: * * * * * lynx -dump [somedomain.com...] from the article.

But what should I add so it will not mail me messages about what it did, especially when it is succesful?



 5:11 pm on Oct 20, 2004 (gmt 0)

* * * * * lynx -dump http://www.somedomain.com/cron.php[b] > /dev/null[/b]

If you want a record of the transactions you might want to use /path/to/log.txt rather then /dev/null, but in anycase redirecting via ">" will eliminate emails for the jobs unless an error occurs.


 3:36 am on Oct 21, 2004 (gmt 0)

That cron you have right now (with the 5 *'s) will run your job every minute.
If you want every 15 minutes, you should do as mcavic suggested, and use

*/15 * * * * /command

And to prevent output completely, your cron should look like:

*/15 * * * * /path/to/command >/dev/null 2>&1

You won't get notifications of failures, though. If you want those, use nalin's redirect method.

That remote script you're running, you're not actually executing PHP on it, correct? You're just getting some HTML or XML back from the page on the remote server? If that's the case, then using wget should be fine as well, since you're not actually executing the PHP binary on your hosts' systems.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved