SQL Job : Dynamically change its Next Run Schedule

  • Hi,

    I have one sql job scheduled every 10 min to run. It mainly does some calculation and then dumps results into one table. It sometimes takes 6-7 minites maximum to complete and sometimes it completes in some seconds.

    Our requirement is , As soon as it finish we need to display this latest data on dashboard. but in our case we have to wait for its next schedule and its completion.

    Can we change its schedule dynamically so that once it finishes it should rerun again or after a min time (Not on its scheduled initially).

    Thanks in advance,

    Fanindra

  • fanindrabhortakke (8/23/2016)


    Hi,

    I have one sql job scheduled every 10 min to run. It mainly does some calculation and then dumps results into one table. It sometimes takes 6-7 minites maximum to complete and sometimes it completes in some seconds.

    Our requirement is , As soon as it finish we need to display this latest data on dashboard. but in our case we have to wait for its next schedule and its completion.

    Can we change its schedule dynamically so that once it finishes it should rerun again or after a min time (Not on its scheduled initially).

    Thanks in advance,

    Fanindra

    Change the schedule so that the job runs more frequently: then it will run if it can (ie, if it is not still running from the previous schedule).

    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.

  • 1) if your job puts data into a table I don't see why you need to wait for a SUBSEQUENT RUN for that data to show up on a dashboard. That just doesn't make sense to me.

    2) you can do just about anything you want with SQL Agent jobs using built-in stored procedures (which is what SSMS does when you graphically manipulate jobs).

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 3 posts - 1 through 2 (of 2 total)

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