Windows Scheduled Task Creation

Warship

Well-known Member
Joined
Jul 17, 2007
Messages
1,055
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
Trying to create a Windows Scheduled Task with VBA. Haven't found a whole lot yet. Any one know of a good resource for this?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
How about using the CLI interface? Then you could just use SHELL to create a task.

Code:
[FONT=Courier New]The AT command schedules commands and programs to run on a computer [/FONT]
[FONT=Courier New]at [/FONT][FONT=Courier New]a specified time and date. The Schedule service must be running [/FONT]
[FONT=Courier New]to use [/FONT][FONT=Courier New]the AT command.[/FONT]
 
[FONT=Courier New][SIZE=1]AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]][/SIZE][/FONT]
 
[FONT=Courier New][SIZE=1]AT [\\computername] time [/INTERACTIVE][/SIZE][/FONT]
[FONT=Courier New][SIZE=1][ /EVERY:date[,...] | /NEXT:date[,...]] "command"[/SIZE][/FONT]
 
[URL="file://\\computername"][FONT=Courier New][SIZE=1]\\computername[/SIZE][/FONT][/URL][FONT=Courier New][SIZE=1]     Specifies a remote computer. Commands are scheduled on the[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]               local computer if this parameter is omitted.[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]id                 Is an identification number assigned to a scheduled[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]               command.[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]/delete            Cancels a scheduled command. If id is omitted, all the[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]               scheduled commands on the computer are canceled.[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]/yes               Used with cancel all jobs command when no further[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]               confirmation is desired.[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]time               Specifies the time when command is to run.[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]/interactive       Allows the job to interact with the desktop of the user[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]               who is logged on at the time the job runs.[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]/every:date[,...]  Runs the command on each specified day(s) of the week or[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]               month. If date is omitted, the current day of the month[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]               is assumed.[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]/next:date[,...]   Runs the specified command on the next occurrence of the[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]               day (for example, next Thursday).  If date is omitted, the[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]               current day of the month is assumed.[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]"command"          Is the Windows NT command, or batch program to be run.[/SIZE][/FONT]
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,876
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top