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

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -