Job Scheduling --- I need it to rune every 125 minutes ..

  • Hi all ,

    Well i never configured a job with t-sql . It allways happened through management studio

    I have a little but big problem . I need my job tu run every 125 minutes but the wizard does not allow that , it automatically converts it to 120minutes .

    is there a way to schedule the job to run in every 125 minutes ?

    thanks in advance 🙂

  • Here's what I did. Create the job, create the schedule to run every 12 minutes.

    Script it out instead of doing OK.

    Then in the script find the code that looks like this and change 12 for 125 :

    EXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, @name=N'test',

    @enabled=0,

    @freq_type=4,

    @freq_interval=1,

    @freq_subday_type=4,

    @freq_subday_interval=125, --change to 125 here

    @freq_relative_interval=0,

    @freq_recurrence_factor=0,

    @active_start_date=20110510,

    @active_end_date=99991231,

    @active_start_time=0,

    @active_end_time=235959

    I've not tested the agent execution timing, but if the scheduler says 125 minutes I believe him!

    BTW using the same type of hack, you can schedule a job every few seconds (not that'd I really recommend that unless absolutely required).

  • HMM , i hoped it would work but... ney !

    125 is out of range 🙁

  • Can you post the exact error and context of the error?

    As I said I didn't let the schedule run but it was scheduled correctly on my machine (2005 standard 64 bit SP3).

  • well ninja,

    commands complete succesfully , and when i expand the job in Agent tab i can se the schedule is there .. as soon as i want to edit it .. there pops the error.

    as for the exact error code .. I ll post it later cuzz im not in my office right now .

  • What part of the job do you need to edit?

    It looks like it's only the gui that throws the error.

    Try it again and let the schedule run to see if it works.. then maybe put a comment to only edit the job with scripts and not the gui.

  • I tried it and I get the error "Value of 125 is not valid for value. V alue should be between Minimum and Maximum Parameter name" When I look at the Job Activity Monitor, it does say that the next time ti will run is 12:30 which is about 1 hour 45 minutes (105 minutes) from now, not 125

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Mike01 (5/11/2011)


    I tried it and I get the error "Value of 125 is not valid for value. V alue should be between Minimum and Maximum Parameter name" When I look at the Job Activity Monitor, it does say that the next time ti will run is 12:30 which is about 1 hour 45 minutes (105 minutes) from now, not 125

    Where do you get that error? I got no error on my end, but I didn't run anything after the script.

  • ninja, thanks !!!

    im so happy that i could eat a whole lamb right now ..

    i think we shold report this as a QOS requirement to Microsoft..

    It works ..

    but when you try to modify the schedule using agent tab you get that error

    the properties form does not pop up .

    😀 cheers !

  • f.limani (5/11/2011)


    ninja, thanks !!!

    im so happy that i could eat a whole lamb right now ..

    i think we shold report this as a QOS requirement to Microsoft..

    It works ..

    but when you try to modify the schedule using agent tab you get that error

    the properties form does not pop up .

    😀 cheers !

    You,re absolutely right. Please post your demand at http://connect.microsoft.com/SQLServer and then post the case link here so we can vote on it.

    TIA.

  • Mike01 (5/11/2011)


    I tried it and I get the error "Value of 125 is not valid for value. V alue should be between Minimum and Maximum Parameter name" When I look at the Job Activity Monitor, it does say that the next time ti will run is 12:30 which is about 1 hour 45 minutes (105 minutes) from now, not 125

    ye bart,

    i noticed that too , but its only for the fisrt run . after the firts run dhe next run date gets back to normal

  • f.limani (5/11/2011)


    Mike01 (5/11/2011)


    I tried it and I get the error "Value of 125 is not valid for value. V alue should be between Minimum and Maximum Parameter name" When I look at the Job Activity Monitor, it does say that the next time ti will run is 12:30 which is about 1 hour 45 minutes (105 minutes) from now, not 125

    ye bart,

    i noticed that too , but its only for the fisrt run . after the firts run dhe next run date gets back to normal

    So you're still having issues??

  • Just a followup. When the job ran, it set the next time to run for 125 minutes from the last time it ran, so it seems to be working properly.

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • No guys ,

    Im having a graeat time in my office today .. the sun is shining , and no one bothered me till now 😀

    Thanks you've been very helpful .. especially you ninja !

  • This was removed by the editor as SPAM

Viewing 15 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic. Login to reply