Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old May 8th, 2003, 05:53 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
cron tab help

hello:

I'm wanting to put a new entry into my cron tab, how would the entry look if I wanted it to run everyday at ll AM and 5 PM?

Thanks

Reply With Quote
  #2  
Old May 8th, 2003, 06:52 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: cron tab help

I think it's:

0 11,17 * * * command


Reply With Quote
  #3  
Old June 14th, 2003, 12:28 AM
drevele drevele is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Medina, Ohio
Posts: 233 drevele User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to drevele Send a message via Yahoo to drevele
RE: cron tab help

for a more throw explanation see my tutorial:
http://codewalkers.com/tutorials/43/1.html

Reply With Quote
  #4  
Old June 14th, 2003, 03:19 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: cron tab help

dude, you cant realy be 13 y/o ?!?

Reply With Quote
  #5  
Old August 26th, 2003, 12:52 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: cron tab help

What if i want to send a variable to the php file that i run? Like the one below.

* * * * * /wwwroot/htdocs/ping.php?sid=5

is that the way?
will $_POST be able to retrieve the variable?

Reply With Quote
  #6  
Old August 26th, 2003, 01:18 AM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: RE: cron tab help


Quote:
What if i want to send a variable to the php file that i run? Like the one below.

* * * * * /wwwroot/htdocs/ping.php?sid=5

is that the way?
will $_POST be able to retrieve the variable?


No, you need to do something like:

* * * * * php -f /wwwroot/htdocs/ping.php -- 5

Then you can use the $argv array to access the 5.

You can do the query string method kind of like you wanted, but the actuall command you'd being calling needs to be some kind of web-browser type program like curl.

Reply With Quote
  #7  
Old August 26th, 2003, 07:24 PM
drevele drevele is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Medina, Ohio
Posts: 233 drevele User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to drevele Send a message via Yahoo to drevele
RE: RE: cron tab help

Im not 13 im 12.
Quote:
dude, you cant realy be 13 y/o ?!?


Reply With Quote
  #8  
Old August 27th, 2003, 02:12 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: cron tab help

I need my php file to write to my crontab file and then execute it. It writes to the file but it just doesn't run it. This is what i tried. The exec() doesn't seem to work

php Code:
Original - php Code
  1.  
  2. $sid = 30;
  3. $cron = "*/1 * * * * /wwwroot/htdocs/egs/variables.php '$sid'";
  4.  
  5. $handle = fopen("/etc/$sid", "a+");
  6. fwrite($handle, "$cronn");
  7. fclose($handle);
  8.  
  9. exec("/etc/crontab -r");
  10. exec("/etc/crontab $sid");

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > cron tab help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway