When working with
DaysOfWeek, you create a number based on the day of the week??™s position. These numbers include:
Consequently, if you want to run a task Monday, Wednesday, and Friday, you??™d add 1 (for
Monday), 4 (for Wednesday), and 16 (for Friday) for a total of 21. Setting the DaysOfWeek value to 0
means that the job won??™t run on a particular day of the week. You must include either a DaysOfMonth
or DaysOfWeek as part of the input or the call will fail.
The StartTime variable is as a DATETIME data type and it determines when the job will begin
running the first time. This data type relies on the Universal Time Coordinated (UTC) time. In most
cases, you??™ll simply want a time value, so you??™ll display the date values as eight asterisks (*) as
Day
of the
month
Value Day
of the
month
Value Day
of the
month
Value Day
of the
month
Value
1 1 9 256 17 65536 25 16777216
2 2 10 512 18 131072 26 33554432
3 4 11 1024 19 262144 27 67108864
4 8 12 2048 20 524288 28 134217728
5 16 13 4096 21 1048576 29 268435456
6 32 14 8192 22 2097152 30 536870912
7 64 15 16384 23 4194304 31 1073741824
8 128 16 32768 24 8388608
Day of the Week Value
Monday 1
Tuesday 2
Wednesday 4
Thursday 8
Friday 16
Saturday 32
Sunday 64
SCHEDULING AND MANAGING TASKS 215
shown in the example.
Pages:
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538