Re: Schedule tasks from server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, February 4, 2008 8:30 am, Pieter du Toit wrote:
> Is there a way that i can schedule tasks on my webserver that will
> automatically fire on a certain time and date, without anyone visiting
> the
> website?
>
> This domain is hosted by a ISP and not by me.

There is a low-level utility in Windows DOS whose name is "at" which
is not unlike the lower-level command line utility in *nix named "at"
(read: they're the same).

So, in theory, on a Windows box, even if you don't have access to the
fancy "Scheduled Tasks" GUI, one might have access to "at" in a DOS
prompt...

You could also grab any old box in your closet, throw Linux on it, and
toss your code in to see if it runs, and try to assess how much work
it would be to migrate.

And, finally, for those stuck with horrible webhosts who provide no
access to cron or a Windows-equivalent, there are free services out
there that will "cron" an HTTP request for you.

You then build a PHP script for that external service to visit that
fires off whatever you want.

You may or may not want to do things like password-protect it (and
provide the http://user:pass@xxxxxxxxxxx/daily.php URL to it) or
perhaps have some logic in the code to make sure it doesn't run "too
often" in some kind of denial of service attack.

PS
If your site gets at least SOME traffic, you could also Google for PHP
solutions where you include something on your homepage that checks the
DB for events that need doing.  There used to be more than a few of
these, back in the days when various "panels" (ugh!) didn't provide
cron access.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux