2.3.4 AT_INFO

The client uses the AT_INFO structure to configure a task in the ATSvc NetrJobAdd (section 3.2.5.2.1) method. The server returns the AT_INFO structure with information about a task in the ATSvc NetrJobGetInfo (section 3.2.5.2.4) method. The format of the AT_INFO structure is as follows.

 typedef struct _AT_INFO {
   DWORD_PTR JobTime;
   DWORD DaysOfMonth;
   unsigned char DaysOfWeek;
   unsigned char Flags;
   [string] wchar_t* Command;
 } AT_INFO,
  *PAT_INFO,
  *LPAT_INFO;

JobTime: This field is the time of day the task is to run, expressed as milliseconds after midnight. The value is in the range of 0 to 86399999 (24*60*60*1000-1). JobTime is present on the wire as a 32-bit unsigned integer.<5>

DaysOfMonth: Contains individual bit flags that specify that the task is to run on that day of the month. Bits that do not correspond to a real calendar day (for example, bit 2 in February, which means the 30th) are ignored. See also the JOB_ADD_CURRENT_DATE flag below. The mapping of bit to day of month is as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

x

3 1

3 0

2 9

2 8

2 7

2 6

2 5

2 4

2 3

2 2

2 1

2 0

1 9

1 8

1 7

1 6

1 5

1 4

1 3

1 2

1 1

1 0

9

8

7

6

5

4

3

2

1

1-31: Any bit set to 1 specifies that the task can be run on that day of the month. More than one bit can be set to 1.

x: Unused. Can be set to zero when sent and ignored on receipt.<6>

Bit 0 is not used.

DaysOfWeek: Contains individual bit flags that specify the day of the week on which the task is to run. The mapping of bit to day of week is as follows.


0


1


2


3


4


5


6


7

X

S
U

S
A

F
R

T
H

W
E

T
U

M
O

Value

Description

X

Unused. Can be set to zero when sent and ignored upon receipt.<7>

MO

Monday

If set to 1, specifies that the task can be run on Monday.

TU

Tuesday

If set to 1, specifies that the task can be run on Tuesday.

WE

Wednesday

If set to 1, specifies that the task can be run on Wednesday.

TH

Thursday

If set to 1, specifies that the task can be run on Thursday.

FR

Friday

If set to 1, specifies that the task can be run on Friday.

SA

Saturday

If set to 1, indicates that the task can be run on Saturday.

SU

Sunday

If set to 1, indicates that the task can be run on Sunday.

Flags: Contains individual bit flags set to zero or more of the following values.


0


1


2


3


4


5


6


7

X

0

0

N
I

A
C

R
T

E
R

R
P

Value

Description

X

Unused. MUST be set to zero when sent and MUST be ignored on receipt.<8>

RP

JOB_RUN_PERIODICALLY

If set to 1, specifies that the task has a repeating schedule. See Global Timer (section 3.2.6.1).

ER

JOB_EXEC_ERROR

If an error was encountered during the last time this task tried to execute a program, this bit is set to 1.

RT

JOB_RUNS_TODAY

If set to 1, indicates that this task is to run today.

AC

JOB_ADD_CURRENT_DATE

If set to 1, indicates that the bit corresponding to the current day (today) bit is added to the DaysOfMonth bit mask.

NI

JOB_NONINTERACTIVE

If set to 1, specifies that this task is not to be interactive; that is, it will not interact with the current logged-on user.

Command: This member is a Unicode string that contains the name of a command, batch program, or binary file to execute; or the name of a document to be executed by its associated executable.

Note The DaysOfMonth and DayOfWeek bits can be used simultaneously. For example, setting DaysOfMonth to the fifteenth of the month, DayOfWeek to Tuesday, and JOB_RUN_PERIODICALLY to 1 will cause the job to run on the fifteenth of every month and on Tuesday of every week.