Jun. 11th, 2004

lovingboth: (Default)
I want one of my websites to get data from another website. Every 12 hours, cron will run a PHP script to snaffle it and stick it in a database for later use.

Sometimes, for whatever reason, the snaffle may not work. (The other site may be down, or busy or there may be routing problems or whatever.)

The obvious thing to do is say 'try snaffling until success', but I'm reluctant to alter the php.ini setting that says scripts run for a max of 30 seconds, so...

... is there a good alternative to having a PHP script that says in effect
Is the data already snaffled?
If not, get it.

and getting cron to run this at, say, 00:00, 00:15, 00:30, 00:45 to give four chances of a successful snaffle? The check would be a really quick SQL query, so if it succeeded the first time, the subsequent runs would be very short.

In London?

Jun. 11th, 2004 03:08 pm
lovingboth: (Default)
Go and see Mindbender at the Lyric, Hammersmith, it's very good.

I'm even tempted to see it again, which doesn't happen that often.
lovingboth: (Default)
Don't listen to Thatcher's comments on Reagan if you want to keep your lunch inside you...

Update: It's here, but don't say I didn't warn you...
lovingboth: (Default)
He's beaten Norris by 36k votes, after second preferences.

1st Pref

Livingstone (Lab) 34.3%
Norris (Con) 30.5%
Hughes (LibDem)15.1%
Maloney (UK Indep) 6.9%
German (Respect Coalition) 3.8%
Leppert (BNP) 3.5%
Johnson (Green) 2.7%
other three 3.3%

Profile

lovingboth: (Default)
Ian

July 2025

S M T W T F S
  12345
6 789101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Active Entries

Style Credit

Expand Cut Tags

No cut tags