18.104.22.168.1 NetrJobAdd (Opnum 0)
The NetrJobAdd method MUST add a single AT task to the server's task store.
NET_API_STATUS NetrJobAdd( [in, string, unique] ATSVC_HANDLE ServerName, [in] LPAT_INFO pAtInfo, [out] LPDWORD pJobId );
ServerName: Pointer to a Unicode string that MUST specify the server. The client MUST map this string to an RPC binding handle. The server MUST ignore this parameter. For more information, see [C706] sections 4.3.5 and 22.214.171.124.
pAtInfo: Pointer to an AT_INFO structure (section 2.3.4) that MUST contain the task configuration.
pJobId: MUST return a pointer to the task identifier when the NetrJobAdd method is successful.
In response to this request, the server MUST:
Return ERROR_ACCESS_DENIED if the caller does not have administrative privileges on the server.
Return ERROR_INVALID_PARAMETER if the Command field of the AT_INFO structure is not as specified in section 2.3.4.
Return ERROR_INVALID_PARAMETER if the JobTime field of the AT_INFO structure is not as specified in section 2.3.4.
Return ERROR_INVALID_PARAMETER if the DaysOfMonth field of the AT_INFO structure is not as specified in section 2.3.4.
Return ERROR_INVALID_PARAMETER if the DaysOfWeek field of the AT_INFO structure is not as specified in section 2.3.4.
Determine the next available sequence number (JobId) for the new task— this value MUST be returned in the buffer pointed to by the pJobId parameter.
Update AT_INFO Flags: If the AC bit is set to 1 by the client, specifies that the server MUST set the bit in DaysOfMonth corresponding to the current day of the month. The server MUST set AC to 0 on return.
Store the task in the AT task store.
Update the global timer if this task will run earlier than the current timer value.
MUST return ERROR_SUCCESS if the call was successful.
If any errors are raised during the processing, they are returned. For more information on return codes, see section 2.3.14 and Win32 Error Codes in [MS-ERREF] section 2.1.