The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. February 11, 2012, 02:44:15 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: cron job  (Read 643 times)
tomt
Rookie
**
Offline Offline

Posts: 18


View Profile
« on: September 04, 2009, 06:40:14 AM »

What is the proper format for a cron job in cpanel to execute a url? I tried this, but it does not seem to work.

wget -q http://theUrlIwantToExecute.com

Thanks

Logged

No links in signatures please
NYDAz
Expert
****
Offline Offline

Posts: 209


The night stalker


View Profile WWW
« Reply #1 on: September 04, 2009, 06:52:28 AM »

did you check if wget is installed ?
Logged

I'm an educated fool, with money on my mind !
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #2 on: September 08, 2009, 10:03:27 AM »

What do you mean, "it does not work?" WGet will try to pull the page to the startup directory, so the result may just not be going where you want it.

If I was doing this, I'd wrap the wget into a little shell script that not only pulled the file back to a known directory, but also "touched" another file to make sure it was firing off as expected. Something like:

cd /usr/home/mydirectory
touch ./lastPull
wget http://www.mydomain.com/

Then I'd be able to confirm that the script was executed, and see exactly what was pulled down.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
tomt
Rookie
**
Offline Offline

Posts: 18


View Profile
« Reply #3 on: September 08, 2009, 01:11:04 PM »

I am not a linux guy. I am though getting familiar with cpanel. But I gave up on cron. My son wrote me a little vb.net timer program that I placed on a windows server, so my problem is solved. Since I am executing a url it doesn't matter where the command came from. This works, since Sunday night my program has been getting executed once an hour right to the minute. I get an email report each time.

Thanks,
Tom Thomas
Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #4 on: September 08, 2009, 01:23:19 PM »

I am not a linux guy. I am though getting familiar with cpanel. But I gave up on cron. My son wrote me a little vb.net timer program that I placed on a windows server, so my problem is solved. Since I am executing a url it doesn't matter where the command came from. This works, since Sunday night my program has been getting executed once an hour right to the minute. I get an email report each time.

Well done Tom ... a solution is a solution, regardless of platform.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!