Re: [PHP] Schedule tasks from server

2008-02-04 Thread Richard Lynch
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:[EMAIL PROTECTED]/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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread clive

Pieter du Toit wrote:
98% of the pages is PHP, and i dont know if all my code is *nix compatable, 
it should be, but i dont want to take the risk by moving, i already have to 
much to do still.
  
As Richard said ,theirs the task scheduler in windows, but I would go 
with Paul's suggestion and move your site to a linux box, it will 
probably be better in the long run.


Clive

"Paul Scott" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
  

On Mon, 2008-02-04 at 16:46 +0200, Pieter du Toit wrote:

I am using paradigmsolutions.co.za. I read about cronjobs, but aparently 
it

is only available on unix or linux hosting, is this true?
  

Well, why not just host on *nix then? I see your site is a MS Frontpage
one, but most linux based ISP's also support that anyway. That way you
get the best of both worlds.

Err, just one question though, if you are using FP, where does the PHP
come in?

--Paul









  

All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm




  


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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Daniel Brown
On Feb 4, 2008 11:05 AM, Richard Heyes <[EMAIL PROTECTED]> wrote:
> >>  > your code should be portable
> >>
> >> Except in reality, it probably isn't. Off the top of my head, think file
> >> paths.
> >
> > Which is why I mentioned the exec() family.  Otherwise, relative
> > paths for includes will work regardless of the slash style (*nix / vs
> > Windows \) preferred by the OS.  Or is my as-still non-caffeinated
> > brain missing something obvious here this morning?
>
> Well exec() et-al aren't the only thing that use paths. You might have
> an include/require that begins with "C:\" for example.

Which, in itself, is bad construct and makes it non-portable even
on fellow Windows machines.

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Richard Heyes

 > your code should be portable

Except in reality, it probably isn't. Off the top of my head, think file
paths.


Which is why I mentioned the exec() family.  Otherwise, relative
paths for includes will work regardless of the slash style (*nix / vs
Windows \) preferred by the OS.  Or is my as-still non-caffeinated
brain missing something obvious here this morning?


Well exec() et-al aren't the only thing that use paths. You might have 
an include/require that begins with "C:\" for example.


--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and Helpdesk software for £299 hosted for you -
no installation, no maintenance, new features automatic and free

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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Daniel Brown
On Feb 4, 2008 10:41 AM, Richard Heyes <[EMAIL PROTECTED]> wrote:
>  > your code should be portable
>
> Except in reality, it probably isn't. Off the top of my head, think file
> paths.

Which is why I mentioned the exec() family.  Otherwise, relative
paths for includes will work regardless of the slash style (*nix / vs
Windows \) preferred by the OS.  Or is my as-still non-caffeinated
brain missing something obvious here this morning?

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Richard Heyes

> your code should be portable

Except in reality, it probably isn't. Off the top of my head, think file 
paths.


--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and Helpdesk software for £299 hosted for you -
no installation, no maintenance, new features automatic and free

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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Daniel Brown
On Feb 4, 2008 10:11 AM, Pieter du Toit <[EMAIL PROTECTED]> wrote:
> 98% of the pages is PHP, and i dont know if all my code is *nix compatable,
> it should be, but i dont want to take the risk by moving, i already have to
> much to do still.

As I and others have said, Windows has the scheduled tasks
equivalent to *nix cron jobs.  However, just to add some info on your
last message, unless you're using command-line-specific calls to
system(), exec(), passthru(), etc., then your code should be portable
across across all PHP-supported platforms.  The PHP parsing engine is
handling the code you write, not the OS.

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Pieter du Toit
98% of the pages is PHP, and i dont know if all my code is *nix compatable, 
it should be, but i dont want to take the risk by moving, i already have to 
much to do still.

"Paul Scott" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> On Mon, 2008-02-04 at 16:46 +0200, Pieter du Toit wrote:
>> I am using paradigmsolutions.co.za. I read about cronjobs, but aparently 
>> it
>> is only available on unix or linux hosting, is this true?
>
> Well, why not just host on *nix then? I see your site is a MS Frontpage
> one, but most linux based ISP's also support that anyway. That way you
> get the best of both worlds.
>
> Err, just one question though, if you are using FP, where does the PHP
> come in?
>
> --Paul
>
>





> All Email originating from UWC is covered by disclaimer
> http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
> 

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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Paul Scott

On Mon, 2008-02-04 at 16:46 +0200, Pieter du Toit wrote:
> I am using paradigmsolutions.co.za. I read about cronjobs, but aparently it 
> is only available on unix or linux hosting, is this true?

Well, why not just host on *nix then? I see your site is a MS Frontpage
one, but most linux based ISP's also support that anyway. That way you
get the best of both worlds.

Err, just one question though, if you are using FP, where does the PHP
come in?

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

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

Re: [PHP] Schedule tasks from server

2008-02-04 Thread Richard Heyes
I am using paradigmsolutions.co.za. I read about cronjobs, but aparently it 
is only available on unix or linux hosting, is this true?


Cron is a *nix thing yes. Though Windows has the task scheduler. You'll 
need to check with your ISP to see if it's available or if there's an 
alternative.


--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and Helpdesk software for £299 hosted for you -
no installation, no maintenance, new features automatic and free

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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Per Jessen
Pieter du Toit wrote:

> I am using paradigmsolutions.co.za. I read about cronjobs, but
> aparently it is only available on unix or linux hosting, is this true?

I'm sure a Windows hosting-setup will have something equivalent. 


/Per Jessen, Zürich

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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Daniel Brown
On Feb 4, 2008 9:30 AM, Pieter du Toit <[EMAIL PROTECTED]> wrote:
> Hi people
>
> 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?

In any case, yes but the method depends on whether it's a
POSIX-based system (*nix, Linux, MacOS, etc.) or Windows machine.  On
the former, you'd use cron jobs, while on the latter, you'd use
scheduled tasks.

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Pieter du Toit
I am using paradigmsolutions.co.za. I read about cronjobs, but aparently it 
is only available on unix or linux hosting, is this true?
"Paul Scott" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> On Mon, 2008-02-04 at 16:30 +0200, 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.
>
> Ask your ISP if they support cron jobs - that'll do it. If they don't
> then I would suggest moving ISP's.
>
> I see you have an SA mail address - which ISP are you using? I probably
> know the answer already if you can tell me ;)
>
> --Paul
> -- 
> .
> | Chisimba PHP5 Framework - http://avoir.uwc.ac.za   |
> ::
>
>





> All Email originating from UWC is covered by disclaimer
> http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
> 

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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Michael Fischer
On Mon, 2008-02-04 at 16:30 +0200, Pieter du Toit wrote:
> Hi people
> 
> 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.
> 
> Thanks 
> 
afaik you would need to "persuade" your isp to configure a cron-job for
you.

lg, michi
-- 
Sautergasse 27-29/35
1160 Wien
phone: 0043 650 2526276
email: [EMAIL PROTECTED]
web: http://www.webfischer.at
--
 __  __  ___
|  \/  || __|
| |\/| || _|
|_|  |_||_|

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



Re: [PHP] Schedule tasks from server

2008-02-04 Thread Paul Scott

On Mon, 2008-02-04 at 16:30 +0200, 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.

Ask your ISP if they support cron jobs - that'll do it. If they don't
then I would suggest moving ISP's.

I see you have an SA mail address - which ISP are you using? I probably
know the answer already if you can tell me ;)

--Paul
-- 
.
| Chisimba PHP5 Framework - http://avoir.uwc.ac.za   |
::

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

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

[PHP] Schedule tasks from server

2008-02-04 Thread Pieter du Toit
Hi people

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.

Thanks 

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