Bluehost.com Web Hosting $6.95

question

This is a discussion on question within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Not sure if PHP is right for this... but maybe you guys can point me the right way. I want ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-19-2007
Alan Larsson
 
Posts: n/a
Default question

Not sure if PHP is right for this... but maybe you guys can point me the
right way.

I want a website that with the click of a button by someone accross the web
can run a predefined scheduled task on the web server.

Any ideas?


Reply With Quote
  #2 (permalink)  
Old 03-19-2007
jurij.rosenthal@gmail.com
 
Posts: n/a
Default Re: question

On Mar 19, 12:45 am, "Alan Larsson" <newsgr...@alstown.com> wrote:
> Not sure if PHP is right for this... but maybe you guys can point me the
> right way.
>
> I want a website that with the click of a button by someone accross the web
> can run a predefined scheduled task on the web server.

You hopefully talk about Linux.

Here is how I would do it: Set up cron (using crontab -e) so that
it executes a script that checks periodically for a file (for example;
I think this is easier). This file is created by a Php or Perl script
run
in the web server. If the file exists the script triggered by cron
executes the predefined scheduled task.

Hope it helps.

Cheers
Jurij

Reply With Quote
  #3 (permalink)  
Old 03-23-2007
Christoph Burschka
 
Posts: n/a
Default Re: question

Alan Larsson schrieb:
> Not sure if PHP is right for this... but maybe you guys can point me the
> right way.
>
> I want a website that with the click of a button by someone accross the web
> can run a predefined scheduled task on the web server.
>
> Any ideas?
>
>


What is this predefined task? Is there a shell script or program you can
already run from the command line, but want to trigger through a web
page request as well?

If Apache and your PHP settings have the sufficient permission needed to
execute system commands, then that will work - the relevant function is
system() - as in system("ls -l").

If you want to code the entire scheduled task in PHP, it will depend
more on what it actually deals with - files, database changes, etc...

--
Christoph Burschka
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:34 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0