The Command argument is a simple string that defines
the command you want Task Scheduler to execute. Make sure you include the full path to the executable
to ensure the Task Scheduler can locate it on the hard drive. The InteractWithDesktop
214 CHAPTER 8 PERFORMING TASK AUTOMATION
(determines whether the job only executes in the background) and RunRepeatedly (the job only
executes once when set to false) arguments are Boolean (true/false) values.
The DaysOfMonth and DaysOfWeek arguments are positional. These arguments determine when
to run the job. They use binary flags to set them. If you set the value to 0, then the task isn??™t scheduled
for that time frame. When working with DaysOfMonth, you create a number based on the day??™s
position in the calendar. The value can become quite large. If you want the task to run each day of
the month (from days 1 through 31), then you use a value of 2147483647, which is the maximum
value allowed. Here??™s the list of numbers you use with the day of the month listed first and the value
for the call second.
Using this table, if you want to perform a particular task on day 1 (a value of 1), 5 (a value
of 16), and 7 (a value of 64) of each month, then you would use a value of 81.
Pages:
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537