1
I have a test environment VM with Windows Server
+ Xampp
.
I need to fire a file (script.php
) scheduled every 5 minutes.
What is the simplest and most agile way ?
Update 1
By the Windows "Task Scheduler", the shortest range is "daily":
1
I have a test environment VM with Windows Server
+ Xampp
.
I need to fire a file (script.php
) scheduled every 5 minutes.
What is the simplest and most agile way ?
Update 1
By the Windows "Task Scheduler", the shortest range is "daily":
2
The task must be set in two steps.
First you must create a simple task starting at 0:00 every day. After this, you go on Avançado
(or something similar depending on the OS version) and selects Repetir a cada X minutos
for 24 hours.
The key here is to find the advanced properties. If you are using the XP wizard, it will only offer the start of the advanced dialog box after you create the task.
In newer versions of Windows (7+):
Triggers
.Configurações avançadas
, tick Repetir tarefa a cada
xxx minutes and set Indefinidamente
if you need.Taking advantage also follows how to run a php via Scheduler:
C: Path to php.exe -f "C: Path to file.php"
It worked. Guilherme Nascimento’s answer: https://answall.com/questions/129554/executar-script-php-no-agendador-de-tarefas-do-windows. Thank you ;]
Yes there are several ways to do hehehe
No, it is the same as yours. Only it has the image that exemplifies more easily. In your case, it would be the "Program/script" = C:\xampp\php\php.exe
and "Add arguments (optional)" = C:\xampp\htdocs\site\script.php
... That is, it runs php.exe, and the argument that would be the script, and not the other way around. rs
1
Complementing Otto’s and Otto’s response link
How did you get the XAMPP
:
One must execute the php.exe
, in this case I pulled from the XAMPP
, and the argument would be caminho/script.php
of the archive.
Browser other questions tagged php windows xampp
You are not signed in. Login or sign up in order to post.
Scheduler of windows tasks
– Otto
I put to run the file
php
?– rbz
can run php type.php file or direct file url
– Otto
It only has "daily". With break in minutes no !
– rbz
https://stackoverflow.com/questions/4249542/run-a-task-every-x-minutes-with-windows-task-scheduler
– Otto
In
uma vez
it does not open the range value?– rray
@rray no, it opens a date and time only.
– rbz
@Otto that’s it ! Want to post the answer ? If not I do the prints and post... I will test if it will work the execution...
– rbz
It didn’t work. I put to run the file in . php, wouldn’t it be the same thing as clicking it to open ? That way he doesn’t have a standard program...
– rbz
I made an edit in the reply by putting how to run the scripts
– Otto