Why can't I create a scheduled task with PHP exec()? -
i'm having headaches while trying create scheduled tasks php script because same error xml code malformed !
here's code use :
$tn = 'mailing_19'; $sc = 'once'; $tr = '"\'c:\program files\php\v5.4\php.exe\' \"d:\inetpub\wwwroot\pdbmanager_fmf\communication\ajax\campagne.publish.php 19 1001\" "'; $st = date('h:i:s', time() + (60*60)); $cmd = 'schtasks /create /tn ' .$tn .' /sc ' .$sc .' /tr ' .$tr .' /st ' .$st .' 2>&1'; exec($cmd, $data); print_r($data);
it ends : (it's in french, means xml malformed):
array ( [0] => erreur: le code xml de la tâche contient une valeur incorrectement formatée ou hors limites. [1] => (40,4):task: )
i don't know find xml code involved.
this works while trying in command line though.
please !
Comments
Post a Comment