The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. October 14, 2019, 06:00:49 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Script timings  (Read 1494 times)
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« on: January 21, 2009, 06:15:14 AM »

Now suppose I had a script that tested an api to see how hard it could be pushed...

Normally I would set this script to run on a cron but i note that the xml response of the api is to say please dont try again until <time>whatever</time>

now it would seem more efficient for me to hit request again based on that output - what do you think would be the best way as there isnt really a decent way to schedule a script without cron is there?

This is being run on a shared host for legal practical reasons Smiley
Logged

<mango>Yummmmmmmmmmmmm</mango>
<pie>ewwwwwwwwwww</pie>
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #1 on: January 21, 2009, 06:46:09 AM »

Run it on a crontab, but check right in the beginning of the script for a file with the time. When you hit the remote host and it returns that "please wait" xml, just put the timestamp and an offset into the file with the time.
Logged

hai
rcjordan
Lifer
*****
Offline Offline

Posts: 882


View Profile
« Reply #2 on: January 21, 2009, 06:53:20 AM »

I've seen some pseudo-chron scripts (based upon onLoad, as I recall). Shooting from the hip, it seems like you could use short interval crons to launch a pseudo-cron script. The pseudo-cron, in turn, would check your generated/stored 'next run' time and only launch if the interval was sufficient.
Logged
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!