TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Running a program in real time? (http://www.talkphp.com/absolute-beginners/2223-running-program-real-time.html)

Aaron 02-10-2008 09:08 PM

Running a program in real time?
 
How would I run a program in real time? Like... X seconds away from whenever. or months... And then be able to cancel that time, and add a new one.

Like, execute a function a day from now, but later on tonight I submit a form that says execute it 3 days from now...

xenon 02-10-2008 09:10 PM

Use cron jobs?

ReSpawN 02-10-2008 09:38 PM

Not all cron jobs are the same is what I heard. Next to that, I don't even know how to activate them in DirectAdmin or Plesk. Got some intel on that xenon?

Aaron 02-10-2008 10:47 PM

How would I use cron jobs from a PHP script? Is it reliable to use when managing important things?

xenon 02-11-2008 02:22 AM

Quote:

Originally Posted by Aaron (Post 10566)
How would I use cron jobs from a PHP script? Is it reliable to use when managing important things?

You don't "use them from PHP'. You program the system to run some PHP scripts (e.g.: system commands) at a specified time. That's all. You can schedule a single run, a one day/week delayed task, or an hourly task. It's up to you.

Respawn: sorry, I have no clue.

flyingbuddha 02-11-2008 01:55 PM

You can use cron jobs to call php scripts Aaron, there's normally a button in Plesk for setting up cron jobs, just search under the domain you're managing.

Aaron 02-12-2008 11:29 PM

Then Cron Jobs is useless to me ;-)

Village Idiot 02-12-2008 11:35 PM

I dont see how it is useless to you, cron seems to be exactly what you are looking for.

wGEric 02-13-2008 08:42 PM

From your first post a cron job is what you want. You can write a psuedo cron script in PHP but it won't be as reliable as a cron job since someone has to hit the page in order for it to execute.

Devels 02-13-2008 10:03 PM

If you don't have a webadministrator tool, but SSH acces to your host, then you can use the crontab command to configure running commands or php scripts at regular intervals.

codefreek 02-14-2008 03:39 AM

this is not hard to fix,
make a batch file and you can like make a php script to excute the batch file,
or even if you want it at a time in cmd u can do as some one said here. put a time on when to start that php script,

and when to start other script or end it...

Google, is good :) ;)

Google -> batch edit + time + php so on...

;)


All times are GMT. The time now is 08:11 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0