Programatically scheduling a job

This is a continuation of this thread: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_21182637.html

I know I can schedule a job via the command prompt that's fine however, how do I programatically check if the job already exists?  I need to know for sure that the job doesn't exist before I create the job.

Any ideas?

Thanks in Advance,

Bill
LVL 6
billy21Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
0
 
rdrunnerCommented:
You can assign an ID to a job you create. By doing this you can make sure only one exists. (By deleting the job with the ID 1st and then inserting this.
0
 
billy21Author Commented:
I thought of that too but you actually can't assign your own id to a job as far as I can see.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
rdrunnerCommented:
You can...

at [\\Computername] [{[ID] [/delete]|/delete [/yes]}]

There is an optional ID tag :)
0
 
billy21Author Commented:
rdrunner,

at [\\Computername] [{[ID] [/delete]|/delete [/yes]}]

That is the syntax for deleting.  There is another syntax example for creating and it does not include id.  You need to specify id in deleting so AT knows which item to delete.  The syntax for creating an item is...
at [\\computername] time [/interactive] [/every:date[,...] ¦ [/Next:date[,...]] "command"
0
 
rdrunnerCommented:
Oops...

true :)

But i like the link emoreau posted :) (Its added to my bookmarks now)
0
All Courses

From novice to tech pro — start learning today.