x

How to create a JOB to be executed at some specific time.

I have to write a JOB in sql server 2005 to be executed everyday 12AM. Please help me to create a JOB.

more ▼

asked Oct 26, 2009 at 02:59 PM in Default

Nitin Kumar gravatar image

Nitin Kumar
11 1 1 1

(comments are locked)
10|1200 characters needed characters left

2 answers: sort oldest

The easiest way would be to use SQL Server Agent to schedule your job to run every day at 12AM.

This link should point you in the right direction:

http://msdn.microsoft.com/en-us/library/ms187880.aspx

more ▼

answered Oct 26, 2009 at 03:08 PM

Jay Bonk gravatar image

Jay Bonk
1.4k 2

(comments are locked)
10|1200 characters needed characters left

You need to make sure that the SQL Agent service is running on the machine. You can create a job in two ways, and the first leads to the second. Inside SMSS go into SQL Server Agent->Jobs->(right-click)->new jobs

from there you can give your job a name and create any steps from 'Steps' and set the time from 'Schedules'.

the second way to create a job is via script and if you create the job initially via SMSS you can script that job out to a file to see how it is created.

more ▼

answered Oct 26, 2009 at 03:10 PM

Christopher Klein gravatar image

Christopher Klein
101 2

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x91
x86
x31

asked: Oct 26, 2009 at 02:59 PM

Seen: 2129 times

Last Updated: Oct 26, 2009 at 11:44 PM