[OBJECTIVES]
1 Execute a complete script on any other computer without having to program the task one by one, but rather a file does that work for me
2 Well, the idea is that my script runs completely at a certain time or when windows starts, well, either one, and I had heard that with a bat file this could be achieved, so...
I am trying this:
schtasks /Create [/S <system> [/U <username> [/P [<password>]]]]
[/RU <username> [/RP <password>]] /SC <HOURLY> [/MO <HOURLY:4 hours>] [/D <day>]
[/M <months>] [/I <idletime>] /TN <Ejemplo> /TR <C:\Users\PERSONAL\Desktop\Vivete\Imagen2.py> [/ST <9:30>]
[/RI <interval>] [ {/ET <endtime> | /DU <duration>} [/K] [/XML <xmlfile>] [/V1]]
[/SD <startdate>] [/ED <enddate>] [/IT] [/Z] [/F]
It is the first time that I make a .bat file, any recommendation you can make I appreciate it. I also want to know if the task is already scheduled in windows, if there is another easier or better way to schedule a task in windows remotely, that is, for any other computer, please let me know.
(PS) When I say remote I don't mean a computer that I can access but any computer that downloads my program
In this answer (in English) there are some tips that seemed quite successful. I add some things.
Depending on what the script does you can:
The solution depends on what you need or what the script does. Noting the following differences:
In my case, so that it does not show the CMD window, what I did was a small EXE in Visual Basic with a Process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden