• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

schedule job

hi,

Please assist how can we resolve the error poping up when i apply, Error 14266: the specified '@active_end_tme' is invalid (valid values are: before or after @active_start_time) job was not saved.

I wanted to schdule the job for 23:59:59 daily.

what I did was,

Occures:Daily
Every 1 day

Daily frequency:
Occurs once at 23:59:59




Thanks.
0
RyanBank
Asked:
RyanBank
  • 3
  • 2
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
You can handle this is 2 ways
1. change the start time to 235958
2. Change the schedule not the time
select the  "occurs once at " option (the first one in the daily frequency section). It will run once a day (or at whatever interval you have set or want set in the Occurs section) at 11:59:59 PM.
0
 
RyanBankAuthor Commented:
aneeshattingal,

i did exactly the same using number 2. this is how i got the error. it works for 23:59:58 but doesn't for 23:59:59...

how do we normally schedule ?
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
The same thing happened to me also, So when i generated the script for the job, i found that the @active_end_tme' is set as 235959 which is the endof the day (remember the variable will be in the format 'HHMMSS'). This is because you schedule it to run on daily basis, so your start time and end time will be the same, Since it is a routine, it has to finish @ 235959...
So in order to run on a daily basis you need to reduce the time by 1 second, so that the job can run for at least one second

Hope you got the idea
0
 
RyanBankAuthor Commented:
wont we loose 1 second of data? if we set it to 23:59:58

23:59:59 data's
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
Yes , that's true, If you want that thing, you can handle this at the  your procedure or Query itself. you can write a query to fetch the contents b/w 00000 and 235959 of the previous day and schedule the job at  '00000'

Otherwise you have to use the 2nd option i have mentioned in my first post
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now