Cmd windows task scheduler

команды SchTasks schtasks commands

Планирует выполнение команд и программ периодически или в определенное время, добавляет и удаляет задачи из расписания, запускает и останавливает задачи по требованию, а также отображает и изменяет запланированные задачи. Schedules commands and programs to run periodically or at a specific time, adds and removes tasks from the schedule, starts and stops tasks on demand, and displays and changes scheduled tasks.

Средство schtasks.exe выполняет те же операции, что и запланированные задачи на панели управления. The schtasks.exe tool performs the same operations as Scheduled Tasks in Control Panel. Эти инструменты можно использовать совместно и взаимозаменяемы. You can use these tools together and interchangeably.

Необходимые разрешения Required permissions

Чтобы запланировать, просмотреть и изменить все задачи на локальном компьютере, необходимо быть членом группы «Администраторы». To schedule, view, and change all tasks on the local computer, you must be a member of the Administrators group.

Чтобы запланировать, просмотреть и изменить все задачи на удаленном компьютере, необходимо быть членом группы «Администраторы» на удаленном компьютере или использовать параметр /u для предоставления учетных данных администратора удаленного компьютера. To schedule, view, and change all tasks on the remote computer, you must be a member of the Administrators group on the remote computer, or you must use the /u parameter to provide the credentials of an Administrator of the remote computer.

Параметр /u в операции /CREATE или /Change можно использовать, если локальный и удаленный компьютеры находятся в одном домене или если локальный компьютер находится в домене, которому доверяет домен удаленного компьютера. You can use the /u parameter in a /create or /change operation if the local and remote computers are in the same domain, or if the local computer is in a domain that the remote computer domain trusts. В противном случае удаленный компьютер не может проверить подлинность указанной учетной записи пользователя и не сможет проверить, является ли эта учетная запись членом группы «Администраторы». Otherwise, the remote computer can’t authenticate the user account specified, and it can’t verify that the account is a member of the Administrators group.

Источник

Use the at command to schedule tasks

This article describes how to use the at command to create and to cancel scheduled tasks.

Original product version: В Windows 2000
Original KB number: В 313565

This article applies to Windows 2000. Support for Windows 2000 ends on July 13, 2010. For more information, see the Microsoft Support Lifecycle Policy.

Summary

In Windows 2000, you can use the Task Scheduler tool in Control Panel to schedule tasks. You can also use the at command to schedule tasks manually.

Overview of the at command

You can use the at command to schedule a command, a script, or a program to run at a specified date and time. You can also use this command to view existing scheduled tasks.

To use the at command, the Task Scheduler service must be running, and you must be logged on as a member of the local Administrators group. When you use the at command to create tasks, you must configure the tasks so that they run in the same user account.

The at command uses the following syntax:

at \\computername id/delete | /delete /yes

The following list describes the parameters that you can use with the at command:

\computername: Use this parameter to specify a remote computer. If you omit this parameter, tasks are scheduled to run on the local computer.

time: Use this parameter to specify the time when the task is to run. Time is specified as hours: minutes based on the 24-hour clock. For example, 0:00 represents midnight and 20:30 represents 8:30 P.M.

/interactive: Use this parameter to allow the task to interact with the desktop of the user who is logged on at the time the task runs.

/every: date. : Use this parameter to schedule the task to run on the specified day or days of the week or month, for example, every Friday or the eighth day of every month. Specify date as one or more days of the week (use the following abbreviations: M,T,W,Th,F,S,Su) or one or more days of the month (use the numbers 1 through 31). Make sure that you use commas to separate multiple date entries. If you omit this parameter, the task is scheduled to run on the current day.

Читайте также:  Hdb interface драйвер для виндовс 7

id: Use this parameter to specify the identification number that is assigned to a scheduled task.

/delete: Use this parameter to cancel a scheduled task. If you omit the id parameter, all scheduled tasks on the computer are canceled.

/yes: Use this parameter to force a yes answer to all queries from the system when you cancel scheduled tasks. If you omit this parameter, you are prompted to confirm the cancellation of a task.

When you use the at command, the scheduled task is run by using the credentials of the system account.

Create a scheduled task

Click Start, point to Programs, point to Accessories, and then click Command Prompt.

At the command prompt, type the net start command, and then press ENTER to display a list of currently running services:

If Task Scheduler is not displayed in the list, type the following line, and then press ENTER:

At the command prompt, type the following line (use the parameters that are appropriate to your situation), and then press ENTER:

Examples

To copy all files from the Documents folder to the MyDocs folder at midnight, type the following line, and then press ENTER:

To back up the Products server at 11:00 P.M. each weekday, create a batch file that contains the backup commands (for example, Backup.bat), type the following line, and then press ENTER to schedule the backup:

To schedule a net share command to run on the Sales server at 6:00 A.M. and to redirect the listing to the Sales.txt file in the shared Reports folder on the Corp server, type the following line, and then press ENTER:

Cancel a scheduled task

Click Start, point to Programs, point to Accessories, and then click Command Prompt.

At the command prompt, type the net start command, and then press ENTER to display a list of currently running services.

If Task Scheduler is not displayed in the list, type the following line, and then press ENTER:

At the command prompt, type the following line (use the parameters that are appropriate to your situation), and then press ENTER:

Examples to cancel scheduled tasks

View scheduled tasks

To view the tasks that you created by using the at command, follow these steps:

Click Start, point to Programs, point to Accessories, and then click Command Prompt.

At the command prompt, type the net start command, and then press ENTER to display a list of currently running services.

If Task Scheduler is not displayed in the list, type the following line, and then press ENTER:

At the command prompt, do one of the following steps:

Examples to view scheduled tasks

Troubleshooting

When you type at \\computername to view a list of scheduled tasks, some (or all) of the scheduled tasks that you created by using the at command are not listed.

This behavior can occur if you modified the tasks in the Scheduled Tasks folder after you used the at command to create the task. When you use the at command to schedule a task, the task is displayed in the Scheduled Tasks folder in Control Panel. You can view or modify the task. However, if you modify the task, when you use the at command, you cannot view the task.

When you use the at command to schedule a task, the task does not run at the specified time or date.

This behavior can occur if one of the following conditions is true:

The command syntax is incorrect.

After you schedule a task, type at \\computername to confirm that the syntax is correct. If the information that is displayed under Command Line is incorrect, cancel the task, and then recreate it.

References

For more information about how to use the at command in Windows 2000, see Windows 2000 Help. To do so, click Start, click Help, click the Index tab, and then type at command.

Источник

Как запустить Планировщик заданий Windows — 7 способов

Давайте посмотрим, как запустить Планировщик заданий Windows на компьютере разными способами. Оснастка Планировщик заданий — компонент операционной системы Windows для выполнения различных заданий, запланированных в определенное время.

С помощью Планировщика заданий выполняются работы по автоматическому обслуживанию операционной системы, выполняется отложенный запуск приложений и т. п. Часть заданий запланирована в Планировщике самой Windows, другие задания автоматически добавляются программами или планируются пользователем, после добавления задания вручную в средство системы.

Планировщик заданий позволяет запланировать и автоматически выполнить конкретные действия на компьютере в определенное время, без участия пользователя. Среди выполняемых операций могут быть совсем нежелательные задания.

Как открыть Планировщик заданий Windows? Есть несколько способов для запуска оснастки в операционной системе. В статье мы разберем варианты, которые подходят для Windows 10, Windows 8.1, Windows 8, Windows 7.

Как открыть Планировщик заданий в окне «Выполнить»

Универсальный способ для запуска Планировщика заданий во всех версиях операционной системы Windows: запуск команды с помощью диалогового окна «Выполнить».

Проделайте следующие действия:

На Рабочем столе компьютера откроется оснастка Планировщик заданий. Теперь вы можете посмотреть запланированные задания, при необходимости, изменить или удалить ненужные задания.

Читайте также:  Windows 10 не видит usb накопитель

Как открыть Планировщик заданий при помощи поиска Windows

Следующий способ: использование штатной функции поиска в операционной системе Windows. Выполняемое действие подобно во всех версиях системы, отличается только интерфейс Виндовс.

В Windows 7 войдите в меню «Пуск», введите выражение «планировщик заданий» (без кавычек) в поле «Найти программы и файлы», запустите приложение.

В Windows 8.1 и Windows 8 проведите курсором мыши сверху вниз в правой части экрана, в боковой панели, в поле «Поиск» введите выражение «планировщик заданий» (без кавычек), запустите системное средство.

В Windows 10 кликните по значку поиска на Панели задач, введите выражение «планировщик заданий» (без кавычек), запустите классическое приложение.

Запуск Планировщика заданий в командной строке

Далее рассмотрим еще один инструмент для того, чтоб открыть Планировщик заданий — командная строка. О том, как найти командную строку в Windows 10 читайте здесь.

После этого, на компьютере откроется окно «Планировщик заданий».

Как открыть Планировщик заданий в Windows PowerShell

Еще один из способов для запуска планировщика на компьютере: с помощью средства Windows PowerShell.

В Windows 10 сделайте следующее:

В результате, на ПК будет открыт Планировщик заданий.

Открытие Планировщика заданий в Управление компьютером

Планировщик заданий встроен в консоль Управление компьютером, оттуда его можно открыть.

Для запуска консоли Управление компьютером можно воспользоваться диалоговым окном «Выполнить», введя команду: «compmgmt.msc» (без кавычек).

Другой способ войти в консоль Управление компьютером:

В окне «Управление компьютером» в разделе «Управление компьютером (локальный)» в списке служебных программ отобразится Планировщик заданий.

Открываем Планировщик заданий из меню «Пуск»

Планировщик заданий присутствует в списке приложений меню «Пуск». Для запуска приложения необходимо войти в меню «Пуск», среди списка программ найти папку «Средства администрирования», а затем запустить Планировщик заданий.

Как открыть планировщик заданий Windows из Панели управления

В завершении, мы запустим системное средство из Панели управления. Сначала необходимо открыть Панель управления операционной системы.

Мы запустим Панель Управления способом, который работает во всех версиях Windows:

Выводы статьи

В случае необходимости, пользователь может открыть Планировщик заданий в Windows разными способами: вводом команды из диалогового окна «Выполнить», из командной строки, из Windows PowerShell, осуществить запуск приложения из меню «Пуск», из оснастки Управление компьютером, из Панели управления, с помощью поиска.

Источник

Schedule tasks from command line

Schedule tasks‘ is a GUI application using which we can schedule tasks, There is an equivalent utility which provides the same functionality but with the advantage that it can be used from windows command line. This command is Schtasks. This is an in-built windows command supported by XP, Vista and Windows 7. Let’s see the syntax of this command with the help of few examples.

If you are logged into the same computer where you want to run the scheduled task, then you can use the below command to create the task.

Now let’s see few examples.

Example 1: Schedule disk defragmentation on every Saturday at 10AM. User credentials are administrator/password.

If the specified username and password are correct, then you would get the below message when you run the above command.

If the credentials are not correct, you may get a warning like below.

If there exists a scheduled task with the same name then the error would be:

If you need to use a domain user account to run the task you can specify domainname\username with /RU option.

How to get the list of scheduled tasks?

Just run Schtasks command and you can see the list of scheduled commands.

If you want complete details about each of the tasks you can run the command ‘Schtasks /query /v

Delete a scheduled task

We can delete a schedule task using ‘schtasks /delete /TN task_name‘ command. For example, to delete the task we created in the example 1 we can run the below command.

Delete all the scheduled tasks

You can run the below command to delete all the scheduled tasks.

Disable a scheduled task

There does not seem to be a way to disable a scheduled task from command line. We can delete the tasks as mentioned above.

Modify a scheduled task:

We can change a scheduled task using ‘schtasks /change’ command. Run ‘schtasks /change /?’ for the syntax.

how to delete from the folder?

schtasks /delete /TN “Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser” /F

It is possibile to disable sheduled task. Here is an example:
schtasks /Change /TN “Microsoft\Windows\MUI\LPRemove” /Disable

How do you do it if the task is meant to be run on a DIFFERENT computer (like with the “connect to another computer”)? Thank you! On cmd please.

I’m regarding to run a batch file by a schedule task.

This script is running chrome with a specific url.

The problem is that I must choose some credential in my command line like this :
schtasks /create /sc once /tn Video_XP /tr “\\myserver\myscript.bat” /u contoso\admin /p mypassword /st 12:25:00

The problem is that the task is running with an other account than the login one.

If I replace /u by %username% i’m not able to specify the passord and the task will stuck in background requesting password.

Читайте также:  Sound blaster g6 драйвер для windows

Please tell how can I know whether a task is Enabled/Disabled using CMD queries
Please provide a Example supporting your answer.

what to add in cmd for sidebar execute properties, setting,
for this two things:
if the task fails, restart every: 30 minutes
also deselect stop the last if it runs longer den

Can I get the command to enable “Run whether user is logged in or not” option while scheduling task from command line.

Hello everybody!
I was forced to use win10 –
lot’s of automatic pop ups, reminders and other annoying stuff
called “features”. However:
My company is constructing high-level measurement devices.
(i’m doing electronics)
our win-develloper just committed suicide and i’m left with the crap…
(just kidding)
Please help me!
A pop up that wanted to update or install language-support popped up
and tried to connect to www to do some updates – Why?! The sys was running fine!
Since our devices are ment to work headless but only with a remote-access,
there will be no connection to www ever… So:
Q1) how to get win10 a bit more www-independent?

Back to the pop-ups: As a source of evel, i identified schtasks…
I don’t consider it smart, to have a let’s tidy-up-the harddrive-task starting in the bg,
or debugging when our customer just wants to shut down the system and is forced to wait.

So, what will be damaged (especially concerning wifi) when i just do
schtask /TN * /delete?

Thanks a lot for your answers!
(Sorry for my upset state…)
indigo

schtasks /Create /tn “mytask” /sc MINUTE /mo 1 /ru “myuser” /rp “mypassword” /tr “C:\Windows\System32\calc.exe”
this command does not run calculater.
Any help in this?

schtasks /Create /tn “mytask” /sc MINUTE /mo 1 /tr “C:\Windows\System32\calc.exe”

i guess you can run calc as a dif user, but no need to if youre just trying to add something. otherwise your syntax was incorrect and idk what your username and password were.
and you will want to run this after you get the above correct unless you want to see the calc open up every minute… 😉

Источник

How to launch Windows Scheduler by command-line? [closed]

Want to improve this question? Update the question so it’s on-topic for Stack Overflow.

I mean to open the built-in Windows GUI from command line- not to launch by Schtasks

10 Answers 10

taskschd.msc is available in Windows Vista and later.

I could have sworn I’d seen a little task scheduler GUI like you’re talking about prior to Vista, but maybe I was thinking of the «Add Scheduled Task» wizard.

You might have to settle for opening the scheduled tasks explorer with this command:

I couldn’t find any way to launch the «Add Scheduled Task» wizard from the command line, unfortunately (there has to be a way!)

I’m using Windows 2003 on the server. I’m in action with «SCHTASKS.EXE»

It’s quite interesting and makes me feel so powerful. 🙂

This launches the Scheduled Tasks MMC Control Panel:

Older versions of windows had a splash screen for the MMC control panel and the /s switch would supress it. It’s not needed but doesn’t hurt either.

Yes, the GUI is available in XP. I can get the list of scheduled tasks (but not the GUI) to open with the following command,

Then you can use the wizard to add a new scheduled task, for example.

In XP, you can find the Scheduler GUI from within Windows Help if you search for «Scheduled Tasks» then click on «Step by Step instructions» and open the scheduler GUI. Clicking on the last link executes the following command, which likely could be translatedinto something that would open the Scheduler GUI from the command line. Does anyone know how?

Here is an example I just used:

Then, to check my work:

You might want to have look at simple command line scheduler «at»:

The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command.

\computername Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.

id Is an identification number assigned to a scheduled command.

/delete Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled.

/yes Used with cancel all jobs command when no further confirmation is desired.

time Specifies the time when command is to run.

/interactive Allows the job to interact with the desktop of the user who is logged on at the time the job runs.

/every:date[. ] Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed.

/next:date[. ] Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed.

«command» Is the Windows NT command, or batch program to be run.

Источник

Поделиться с друзьями
Советы экспертов и специалистов
Adblock
detector