run job schedule evry 20 second HOW

  • help

    how to run job evry 20 second

    thnks ilan

  • I cannot schedule anything more frequently than every minute - is that good enough?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • no i need it for my web site for live data

    any idea how ????????????????

  • Never tried it, but I guess if you shedule 3 jobs that runs each 1 minute with a 20 second difference, it should work.

    1st job : starts at 00:00:00 and runs every minute

    2nd job : starts at 00:00:20 and runs every minute

    3rd job : starts at 00:00:40 and runs every minute

    I don't see any other way of doing this.

    Eric

  • i dont understanding what is the problem of microsoft so thet i can run job evry 20 second ????

    no way to manual do it from Transact SQL ????

    thnks ilan

  • OK I am going to tell you a little secret   use it at your own risk

    if you look at sp_add_job schedule the constants defined for the frequency on the parameter @freq_subday_type are

    0x1 - Not Used (once a day)

    0x4 - Minutes

    0x8 - Hours

    Do you notice anything missing in that sequence ?.....

    Yep, 0x2 should be Seconds so you can script out a job setup with 1 min interval, change the constant and script it back in.

    Now, Do you really need this??? you could simply schedule a script out of the server with that pooling interval and execute and sp. That will have the advantage of being supported . On the other hand you will have to make sure that your job is not running next time is called (Jobs are not re-entrant)

    HTH

     


    * Noel

  • thnks but thre is a problem

    ----------------------------------

    Server: Msg 14295, Level 16, State 1, Procedure sp_verify_jobschedule, Line 57

    Frequency Type 0x2 (OnDemand) is no longer supported.

    ----------------------------------------------

    can i to force the JOB to do this

     

    thnks ilan

  • Perhaps you could have a stored procedure that runs continuously (loop back to start) with a WAIT DELAY '000:00:20'.  That would solve the problem of trying to schedule a job that ran less than once a minute and it would definitely solve the possible reetrant problem.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • I like Jeff's suggestion, but I might also add another job to check and be sure the first one is sitll running.

     

Viewing 9 posts - 1 through 8 (of 8 total)

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