How to run a web page less then 1 minute with cron job?

  • jojoboy1979
  • Born
  • Born
  • No Avatar
  • Joined: Mar 10, 2005
  • Posts: 1
  • Status: Offline

Post March 10th, 2005, 2:40 pm

Hello all,

I want to run a php page every 30 seconds with cron job, how can I do it?
The example below is find, or it make a problem with the memory if I run it every 1 minute with cronjob?
<?
sleep(30);
Command1;
?>
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 10th, 2005, 2:40 pm

  • Xel02
  • Proficient
  • Proficient
  • No Avatar
  • Joined: Jun 15, 2004
  • Posts: 261
  • Status: Offline

Post March 11th, 2005, 12:18 am

What is the purpose of this PHP page? If your using Linux (which I'm guessing you are since your running cron) wouldn't a simpy shell script work better?
  • xtc
  • Novice
  • Novice
  • No Avatar
  • Joined: Dec 20, 2004
  • Posts: 34
  • Loc: London UK
  • Status: Offline

Post March 21st, 2005, 3:52 am

Use atd rather than crontab. Crontab is designed for things 1minute plus. atd is deisgned for sub one minute jobs.

Also you can write a simple loop script in bash that can call on the php script for ever in the background.
  • mrdance
  • Born
  • Born
  • No Avatar
  • Joined: Aug 06, 2004
  • Posts: 2
  • Status: Offline

Post August 24th, 2005, 8:37 am

If you are using Windows and want a more advanced scheduler with second precision and remote php-execution you should look at VisualCron -> http://www.visualcron.com

regards,

md

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 69 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.