windows - Possible to schedule a task to the second with schtasks? -


i have file creates scheduled task using schtasks:

<?php $cur_dt = new datetime('now'); $cur_dt->add(new dateinterval('pt60s')); $cmd = 'schtasks /create /sc once /ru uname /rp pwd /tn "repost_labor" /tr "' . $fname . '" /st ' . $cur_dt->format('h:i:s') . ' /sd ' . $cur_dt->format('y/m/d');  exec($cmd, $out, $retval); ?> 

so generates looks this:

schtasks /create /sc once /ru uname /rp pwd /tn "repost_labor" /tr "myfile.bat" /st 12:52:12 /sd 2013/07/23 

however, though trying set seconds, task scheduler ignores , adds hour & minute. if current time 12:51:12, instead of above creating task @ 12:52:12, creates @ 12:52:00.

why task scheduler ignore seconds?

is there workaround?

thanks!

i haven't tried yet, think possible schedule second creating xml task file , using:

schtasks /create /xml <filename> 

because can include seconds in xml.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -