Create a Scheduled Task in Windows XP 32-bit

1

I want to create or modify a task by command line, this on the same machine. I'm using the Schtasks command with argument /Create .

But I got only in Windows 8 when I took the BAT for the machine Windows XP (32-bit) did not work. p>

schtasks /Create /TN "MyTask" /TR C:\MyTask.bat /SC Daily /ST 07:00:00

Returns the message:

ERRO: Sintaxe inválida

But does not specify which one.

I did not find a way to do it with VBS, I researched a lot of topics from other countries, but nothing, I believe it's the Windows version.

    
asked by anonymous 22.03.2018 / 21:58

1 answer

1

You can not really create (and recreate) tasks by command line in Windows XP.

The solution I came up with was to create a number of triggers in a single task which is quite annoying, so I would prefer a BAT to do it.

I've enabled checkbox option Show multiple schedules :

SoIcouldhaveaccesstothe'New'buttonwhichincludesarepeatertriggeridenticaltothepreviousone,butwithanextrahour:

WhenIcreatedoneforeachtime(standard24hours),from00:00to23:00

Thenwhenthesystemstarts(rememberthatalltriggersstartwithoutuserauthentication,ieonlyafterLOGON).

TocompleteIcopiedthefile*.JOBfromtheTASKSfoldertothefolderofmyapplication.

copy%windir%\tasks\mystask.job%homedrive%\myapp\

@ECHOOFF:STARTAPPIFEXIST%windir%\tasks\mystask.job(SETABKP=ON)ELSE(SETABKP=OFF)CLSECHO[1]Menu1ECHO[2]Menu2ECHO[3]AtivaroudesativarAUTOBACKUP:%ABKP%ECHO[4]Menu4ECHO.SET/PSLT=Selecioneumdositensacima:IF"%SLT%"=="1" (GOTO OPTION1)
IF "%SLT%"=="2" (GOTO OPTION2)
IF "%SLT%"=="3" (GOTO OPTION3)
IF "%SLT%"=="4" (GOTO OPTION2)

:OPTION3
IF EXIST %windir%\tasks\mystask.job (
COPY %HOMEDRIVE%\myapp\mytask.job %windir%\tasks\
) ELSE (
DEL %windir%\tasks\mystask.job
)
GOTO STARTAPP

And the best, as it only works after the user "logged in" then regardless of the machine I put or the user running it when the *.JOB file is copied to TASKS folder and you check the properties it automatically changes the user to what is running, ensuring that it will work as it does not ask for authentication.

    
24.03.2018 / 01:23