logo elektroda
logo elektroda
X
logo elektroda

Windows Server 2012 - Task Scheduler does not execute scripts (bat, cmd)

tomaszegtomaszeg 8274 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16573419
    tomaszegtomaszeg
    Level 9  
    Hello,
    I have a problem with Task Scheduler in WS2012 - it doesn't execute bat, cmd scripts - whether it is manually or automatically.

    The scripts work after launching off the schedule from the directory in which they are.

    I have a similar schedule set in WS2003 - it works fine.

    In WS2012, after starting the task schedule, the status all the time (or very long time) is "working" although the script itself is a split second of operation (changing the file name and deleting the oldest). There are no errors, like everything "success" and yet no effect.

    Best regards and thanks in advance for your help
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #3 16574113
    tomaszegtomaszeg
    Level 9  
    thanks for the response, after Sunday I will be at work, I will look at it, however, as to the Administrator's rights to files, I broadcast them from the partition down, on which there are scripts - full control - did nothing (both "Administrators" and "Administrator". I combined the options with the "logged in user" as well as not - with no results ....

    I wonder one thing by the way (I don't know if it has anything to do with it) - the Services Schedule has the status "Running" - when I check "Properties" everything is non-clickable, grayed out (e.g. in the "login" tab), the same "all tasks" -> everything is grayed out

    edit:
    It helped, and more precisely: " Make sure that the task is set to "start in" the folder that contains the batch file: open the task properties, click on the "actions" tab, click on the action and then the "edit" button at the bottom. In the "Edit Action" Window there is a field for "start in (optional)" that you set to the path to the batch file. "i.e. optionally you had to enter the paths to the .bat files .

    Hula, it's nice, thanks for your help :)
  • #4 16820319
    kajoj
    Level 11  
    Hello,

    I would like to ask colleagues who are engaged in this topic because I have a similar problem. Namely:
    - I have a * .bat file that starts the process of creating reports on my computer (in Excel), the file is started by the Task Scheduler,
    - until now, as the application works on WinXP, everything worked, currently I have updated it to Win10 and it no longer works as if I wanted to,
    - the symptom is that when I click directly on the * .bat file, it starts and overwrites me correctly, if it does the Task Scheduler, then the program is executed, but the report files are not overwritten ...
    And I don't really know what's going on ...

    Maybe someone encountered such a problem ??

    Thanks in advance for any hints ...
ADVERTISEMENT