2
I have a scheduled task in windows (working perfectly), where you run a PHP script:
Scheduler:
email php.:
<?php
require_once 'classes/core.class.php';
set_time_limit(120);
$tempo1 = microtime(true);
$core = new Email();
$core -> enviaEmails();
$tempo2 = microtime(true);
echo '<br> tempo: ' . $tempo2 - $tempo1;
?>
The problem is, all the time the window of cmd
, runs the script, finishes and closes. As this task is executed several times in a short time, it gets in the way when working on other tools.
I wonder, how do I "hide" that window, or at least start it minimized?
Which user is using to run the script?
– Gabriel Heming
@Gabrielheming The Adm of the same machine.
– rbz
Switch to System or System user.
– Gabriel Heming
@Gabrielheming perfect! Assemble the answer so I mark as solved. I will also add an image in it. Thank you!
– rbz
just check "run whether or not user is logged in"
– Rovann Linhalis
@Rovannlinhalis also worked expensive! I was only left with doubt about the flag "Do not store the password. The task will only have access to the resources of the local computer." This would be to avoid changing the user password, and stop scheduling?
– rbz
Among other things... On the question, I think it has nothing to do with php... But as a Windows feature... You have to remove the tag there... Maybe even close as out of scope
– Rovann Linhalis
She came out of that: PHP script scheduling in Windows, but quiet! For me you can close!
– rbz