Platform SDK: Network Management |
The NetScheduleJobDel function deletes a range of jobs queued to run at a computer. This function requires that the schedule service be started at the computer to which the job deletion request is being sent.
Only members of the Administrators local group can successfully execute the NetScheduleJobDel function on a remote server.
NET_API_STATUS NetScheduleJobDel( LPCWSTR Servername, DWORD MinJobId, DWORD MaxJobId );
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value is a Win32 API error code. For a list of error codes, see Error Codes.
Call the NetScheduleJobEnum function to retrieve the job identifier for one or more scheduled jobs.
The NetScheduleJobDel function deletes all jobs whose job identifiers are in the range MinJobId through MaxJobId.
To delete all scheduled jobs at the server, you can call NetScheduleJobDel specifying MinJobId equal to 0 and MaxJobId equal to – 1. To delete one job, specify the job's identifier for both the MinJobId parameter and the MaxJobId parameter.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Unsupported.
Header: Declared in Lmat.h; include Lm.h.
Library: Use Netapi32.lib.
Network Management Overview, Network Management Functions, Schedule Functions, NetScheduleJobAdd, NetScheduleJobEnum