|
|
|
как запустить из bat-файла задание из Scheduled Tasks?
|
|||
|---|---|---|---|
|
#18+
Подскажите пожалуйста, Как запустить из командной строки уже созданное задание из Scheduled Tasks? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.08.2006, 16:18 |
|
||
|
как запустить из bat-файла задание из Scheduled Tasks?
|
|||
|---|---|---|---|
|
#18+
запускать из командной строки по расписанию at /? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.08.2006, 16:32 |
|
||
|
как запустить из bat-файла задание из Scheduled Tasks?
|
|||
|---|---|---|---|
|
#18+
GeTзапускать из командной строки по расписанию at /? Нет, я имею ввиду, что мне необходимо запустить уже существующую задачу созданную не командой at , а утилитой Scheduled Tasks. Ее задания хранятся в Windows\Tasks\*.job. .Если просто запустиь *.job, то ситема просит указать программу в которой будет запущено это задание. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.08.2006, 17:06 |
|
||
|
как запустить из bat-файла задание из Scheduled Tasks?
|
|||
|---|---|---|---|
|
#18+
Windows Helpschtasks run Starts a scheduled task immediately. The run operation ignores the schedule, but uses the program file location, user account, and password saved in the task to run the task immediately. Syntax schtasks /run /tn TaskName [/s Computer [/u [Domain\]User [/p Password]]] Parameters /tn TaskName Required. Identifies the task. /s Computer Specifies the name or IP address of a remote computer (with or without backslashes). The default is the local computer. /u [Domain\]User Runs this command with the permissions of the specified user account. By default, the command runs with the permissions of the current user of the local computer. The specified user account must be a member of the Administrators group on the remote computer. The /u and /p parameters are valid only when you use /s. /p Password Specifies the password of the user account specified in the /u parameter. If you use the /u parameter, but omit the /p parameter or the password argument, Schtasks prompts you for a password. The /u and /p parameters are valid only when you use /s. /? Displays help at the command prompt. Remarks Use this operation to test your tasks. If a task does not run, check the Task Scheduler Service transaction log, Systemroot\SchedLgU.txt, for errors. Running a task does not affect the task schedule and does not change the next run time scheduled for the task. To run a task remotely, the task must be scheduled on the remote computer. When you run it, the task runs only on the remote computer. To verify that a task is running on a remote computer, use Task Manager or the Task Scheduler transaction log, Systemroot\SchedLgU.txt. Examples To run a task on the local computer The following command starts the "Security Script" task. schtasks /run /tn "Security Script" In response, SchTasks.exe starts the script associated with the task and displays the following message: SUCCESS: Attempted to run the scheduled task "Security Script". As the message implies, Schtasks tries to start the program, but it cannot very that the program actually started. To run a task on a remote computer The following command starts the Update task on a remote computer, Svr01: schtasks /run /tn Update /s Svr01 In this case, SchTasks.exe displays the following error message: ERROR: Unable to run the scheduled task "Update". To find the cause of the error, look in the Scheduled Tasks transaction log, C:\Windows\SchedLgU.txt on Svr01. In this case, the following entry appears in the log: "Update.job" (update.exe) 3/26/2001 1:15:46 PM ** ERROR ** The attempt to log on to the account associated with the task failed, therefore, the task did not run. The specific error is: 0x8007052e: Logon failure: unknown user name or bad password. Verify that the task's Run-as name and password are valid and try again. Apparently, the user name or password in the task is not valid on the system. The following schtasks /change command updates the user name and password for the Update task on Svr01: schtasks /change /tn Update /s Svr01 /ru Administrator /rp PassW@rd3 After the change command completes, the run command is repeated. This time, the Update.exe program starts and SchTasks.exe displays the following message: SUCCESS: Attempted to run the scheduled task "Update". As the message implies, Schtasks tries to start the program, but it cannot very that the program actually started. schtasks end Stops a program started by a task. Syntax schtasks /end /tn TaskName [/s Computer [/u [Domain\]User [/p Password]]] Parameters /tn TaskName Required. Identifies the task that started the program. /s Computer Specifies the name or IP address of a remote computer. The default is the local computer. /u [Domain\]User Runs this command with the permissions of the specified user account. By default, the command runs with the permissions of the current user of the local computer. The specified user account must be a member of the Administrators group on the remote computer. The /u and /p parameters are valid only when you use /s. /p Password Specifies the password of the user account specified in the /u parameter. If you use the /u parameter, but omit the /p parameter or the password argument, Schtasks prompts you for a password. The /u and /p parameters are valid only when you use /s. /? Displays help. Remarks SchTasks.exe ends only the instances of a program started by a scheduled task. To stop other processes, use TaskKill, a tool included in Windows XP Professional. For more information about TaskKill, see Taskkill. Examples To end a task on a local computer The following command stops the instance of Notepad.exe that was started by the My Notepad task: schtasks /end /tn "My Notepad" In response, SchTasks.exe stops the instance of Notepad.exe that the task started, and it displays the following success message: SUCCESS: The scheduled task "My Notepad" has been terminated successfully. To end a task on a remote computer The following command stops the instance of Internet Explorer that was started by the InternetOn task on the remote computer, Svr01: schtasks /end /tn InternetOn /s Svr01 In response, SchTasks.exe stops the instance of Internet Explorer that the task started, and it displays the following success message: SUCCESS: The scheduled task "InternetOn" has been terminated successfully. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.08.2006, 17:20 |
|
||
|
|

start [/forum/topic.php?fid=26&gotonew=1&tid=1509813]: |
0ms |
get settings: |
7ms |
get forum list: |
19ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
170ms |
get topic data: |
10ms |
get first new msg: |
5ms |
get forum data: |
2ms |
get page messages: |
51ms |
get tp. blocked users: |
1ms |
| others: | 211ms |
| total: | 484ms |

| 0 / 0 |
