I'm trying to schedule a task on Windows Server 2008 to delete some images on a folder. I create a batch file to execute this, my code below:
forfiles /s /m *.jpg /D -10 /C "cmd /c del @path"
(I didn't put the dir because I store the batch file on the same folder where I want to erase the images, so it's no necesary)
My issue is at the time I try to schedule this task to run this automatically. Because when I manually run this file IT ERASE THE IMAGES SUCCESSFULLY, also when I schedule this task with the condition to run it when the administrator is logged in. The problem comes when I specify the condition to run the file either the admin is logged or not and of course with high privileges. I don't know why in this case the task begins running at the time I programmed it, but it never runs the batch file, I can see at the task scheduler that my task is running but nothing's happening. Does somebody have a clue?
I'm including the screenshots of the task scheduler:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…