Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Hourly job running exactly 5 minutes after a round hour

 
   Database Help (Home) -> Programming RSS
Next:  Use CHAR(13) and CHAR (10) in Stored Procedure  
Author Message
Avi

External


Since: Feb 04, 2008
Posts: 17



(Msg. 1) Posted: Tue Jun 03, 2008 4:38 pm
Post subject: Hourly job running exactly 5 minutes after a round hour
Archived from groups: microsoft>public>sqlserver>programming (more info?)

Hi Expert,



I defined a job that runs every hour using the job wizard. However, I would
like it to start running 5 minutes after each round hour i.e. 12:05:00,
13:05:00, 14:05:00 etc



How can I define such scheduling?



Thanks,

Avi

 >> Stay informed about: Hourly job running exactly 5 minutes after a round hour 
Back to top
Login to vote
Aaron Bertrand [SQL Serve

External


Since: Jan 10, 2008
Posts: 2166



(Msg. 2) Posted: Tue Jun 03, 2008 4:38 pm
Post subject: Re: Hourly job running exactly 5 minutes after a round hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

What is a "round hour"? Do you just mean you want it to run at 12:05 AM,
1:05 AM, 2:05 AM? Or do you only want it to run after noon?

In both cases, you just select in the job schedule, occurs every hour, and
starts at 12:05 AM (or 12:05 PM) and runs until 11:59:59 PM. If you mean
something else that I have not covered, then you're going to need to help
out a bit. I have heard of round numbers, but not round hours.

A





"Avi" wrote in message

> Hi Expert,
>
>
>
> I defined a job that runs every hour using the job wizard. However, I
> would like it to start running 5 minutes after each round hour i.e.
> 12:05:00, 13:05:00, 14:05:00 etc
>
>
>
> How can I define such scheduling?
>
>
>
> Thanks,
>
> Avi
>
>
>
>
>
>

 >> Stay informed about: Hourly job running exactly 5 minutes after a round hour 
Back to top
Login to vote
Plamen Ratchev

External


Since: Jan 10, 2008
Posts: 1007



(Msg. 3) Posted: Tue Jun 03, 2008 4:38 pm
Post subject: Re: Hourly job running exactly 5 minutes after a round hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You can change the schedule start time to 12:05:00 and then it will run
every hour at the same time (5 minutes past the hour).

HTH,

Plamen Ratchev
http://www.SQLStudio.com
 >> Stay informed about: Hourly job running exactly 5 minutes after a round hour 
Back to top
Login to vote
Avi

External


Since: Feb 04, 2008
Posts: 17



(Msg. 4) Posted: Tue Jun 03, 2008 5:13 pm
Post subject: Re: Hourly job running exactly 5 minutes after a round hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for the reply. Let's assume that I have the job start date of today
and the start time 12:05:00. If the job is installed after a week at
14:20:00, I assume it will run immediately and not at 15:05:00. That is why
I think setting it to 12:05:00 will not work. Please correct me if I'm
wrong.



Thanks again,

Avi




"Plamen Ratchev" wrote in message

> You can change the schedule start time to 12:05:00 and then it will run
> every hour at the same time (5 minutes past the hour).
>
> HTH,
>
> Plamen Ratchev
> http://www.SQLStudio.com
 >> Stay informed about: Hourly job running exactly 5 minutes after a round hour 
Back to top
Login to vote
Razvan Socol

External


Since: Feb 03, 2008
Posts: 219



(Msg. 5) Posted: Tue Jun 03, 2008 5:13 pm
Post subject: Re: Hourly job running exactly 5 minutes after a round hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Avi wrote:
> [...] Let's assume that I have the job start date of
> today and the start time 12:05:00. If the job is installed after a
> week at 14:20:00, I assume it will run immediately and not at
> 15:05:00. [...]

No, it will run at 15:05:00.

--
Razvan Socol
SQL Server MVP
 >> Stay informed about: Hourly job running exactly 5 minutes after a round hour 
Back to top
Login to vote
Plamen Ratchev

External


Since: Jan 10, 2008
Posts: 1007



(Msg. 6) Posted: Tue Jun 03, 2008 5:13 pm
Post subject: Re: Hourly job running exactly 5 minutes after a round hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Razvan is correct, the job schedule calculates as offset from the start time
set for the schedule, so it will run 5 minutes past the next hour.

HTH,

Plamen Ratchev
http://www.SQLStudio.com
 >> Stay informed about: Hourly job running exactly 5 minutes after a round hour 
Back to top
Login to vote
Avi

External


Since: Feb 04, 2008
Posts: 17



(Msg. 7) Posted: Tue Jun 03, 2008 5:17 pm
Post subject: Re: Hourly job running exactly 5 minutes after a round hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for the reply. I want it to run 24 times each day at 5 minutes after
the hour. Let's assume that I have the job start date of today and the
start time 12:05:00. If the job is installed after a week at 14:20:00, I
assume it will run immediately and not at 15:05:00. That is why I think
setting the start time to 12:05:00 will not work. Please correct me if I'm
wrong.



Thanks again,

Avi



"Aaron Bertrand [SQL Server MVP]" wrote in message

> What is a "round hour"? Do you just mean you want it to run at 12:05 AM,
> 1:05 AM, 2:05 AM? Or do you only want it to run after noon?
>
> In both cases, you just select in the job schedule, occurs every hour, and
> starts at 12:05 AM (or 12:05 PM) and runs until 11:59:59 PM. If you mean
> something else that I have not covered, then you're going to need to help
> out a bit. I have heard of round numbers, but not round hours.
>
> A
>
>
>
>
>
> "Avi" wrote in message
>
>> Hi Expert,
>>
>>
>>
>> I defined a job that runs every hour using the job wizard. However, I
>> would like it to start running 5 minutes after each round hour i.e.
>> 12:05:00, 13:05:00, 14:05:00 etc
>>
>>
>>
>> How can I define such scheduling?
>>
>>
>>
>> Thanks,
>>
>> Avi
>>
>>
>>
>>
>>
>>
>
>
 >> Stay informed about: Hourly job running exactly 5 minutes after a round hour 
Back to top
Login to vote
Aaron Bertrand [SQL Serve

External


Since: Jan 10, 2008
Posts: 2166



(Msg. 8) Posted: Tue Jun 03, 2008 5:17 pm
Post subject: Re: Hourly job running exactly 5 minutes after a round hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> start time 12:05:00. If the job is installed after a week at 14:20:00, I
> assume it will run immediately and not at 15:05:00. That is why I think
> setting the start time to 12:05:00 will not work. Please correct me if
> I'm wrong.

Yes, you are wrong. It will not start until the next start time according
to the schedule(s) you defined.

A
 >> Stay informed about: Hourly job running exactly 5 minutes after a round hour 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
MS SQL ROUND() vs. VB ROUND() - -- Luis Garcia IT Consultant

hourly totals - Hi All I have a Product sales table with fields mydatetime, total etc I need to return hourly totals (money) over a 24 hour period Do I need to select into a temp table first or can I do it directly in TSQL (VB.net 2005) Regards Steve

getdate to the hour mark - So if select getdate() returns 2008-01-21 21:43:04.840 I want to output the value rounding it to the last hour such as 2008-01-21 21:00 Thanks

Calculating Even and Odd hour... - Hello... I have this process that moves data collected from the previous hour to a daily table. What is the best way in t-sql to figure out if the previous hour was an odd hour (1,3,5,7,9,11) or an even hour (12,2,4,6,etc.) Please advise.. Thanks,....

Problem calculating forms per hour - Hi, I have a relatively simple select query that returns a table including a count of forms, and the number of hours between first and last form entry. This seems to work as expected, but as soon as i attempt to perform a forms per hour count, no rows..
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]