schedule job

Posted on 2006-05-17
Last Modified: 2012-05-05

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,

Every 1 day

Daily frequency:
Occurs once at 23:59:59

Question by:RyanBank
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    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.

    Author Comment


    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 ?
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    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

    Author Comment

    wont we loose 1 second of data? if we set it to 23:59:58

    23:59:59 data's
    LVL 75

    Accepted Solution

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    I recently came across an interesting Question In EE ( and was puzzled about how to achieve that using SSIS out of the box tasks, which was i…
    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now