NetScheduleJobGetInfo function

[NetScheduleJobGetInfo is no longer available for use as of Windows 8. Instead, use the Task Scheduler 2.0 Interfaces. ]

The NetScheduleJobGetInfo function retrieves information about a particular job queued on a specified computer. This function requires that the schedule service be started.


NET_API_STATUS NetScheduleJobGetInfo(
  _In_opt_ LPCWSTR Servername,
  _In_     DWORD   JobId,
  _Out_    LPBYTE  *PointerToBuffer


Servername [in, optional]

A pointer to a constant string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.

JobId [in]

A value that indicates the identifier of the job for which to retrieve information.

PointerToBuffer [out]

A pointer to the buffer that receives the AT_INFO structure describing the specified job. This buffer is allocated by the system and must be freed using the NetApiBufferFree function. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths.

Return value

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value is a system error code. For a list of error codes, see System Error Codes.


Normally only members of the local Administrators group on the computer where the schedule job is being enumerated can successfully execute this function. If the server name passed in the string pointed to by the Servername parameter is a remote server, then only members of the local Administrators group on the server can successfully execute this function.

If the following registry value has the least significant bit set (for example, 0x00000001), then users belonging to the Server Operators group can also successfully execute this function.



Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

End of client support

Windows 7

End of server support

Windows Server 2008


Lmat.h (include Lmat.h)





See also

Network Management Overview
Network Management Functions
Schedule Functions