Question about job scheduling

  • I have a job that I want to run every 20 minutes (because it takes about 15 minutes to run). When I schedule it, it shows that the job will run at x time (let's say 7:45), the job takes about 15 minutes so it should get done at about 8:00, but the next job run says it's going to be 8:20. Why doesn't it say the next job run will be 8:05? Isn't that particular job schedule supposed to go based on the start time of the job, not the start and end time?

  • BTW - I found this documentation about the job schedule:

    [ @freq_subday_interval = ] freq_subday_interval

    The number of freq_subday_type periods to occur between each execution of a job. freq_subday_intervalis int, with a default of 0. freq_subday_interval is ignored in those cases where freq_subday_type is equal to 1.

    So does this mean that when the job has completed that it calculates that interval?

  • When I schedule it, it shows that the job will run at x time (let's say 7:45), the job takes about 15 minutes so it should get done at about 8:00, but the next job run says it's going to be 8:20.

    When the job states that the next run is at 8:20, at that time what was the status of the job? Was it executing?

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Adiga (11/1/2010)


    When I schedule it, it shows that the job will run at x time (let's say 7:45), the job takes about 15 minutes so it should get done at about 8:00, but the next job run says it's going to be 8:20.

    When the job states that the next run is at 8:20, at that time what was the status of the job? Was it executing?

    It had just completed (so it calculated 8:00 + 20 minute sub-day frequency)

  • Ok, now it's doing it every 20 minutes from the start time like I wanted it to...I'm confused.

  • I hope you understand that if your job takes > 20 minutes to complete you will skip any 'overlapped' executions of the job.

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

  • TheSQLGuru (11/2/2010)


    I hope you understand that if your job takes > 20 minutes to complete you will skip any 'overlapped' executions of the job.

    Yep.

    Right now, it's averaging about 12 minutes and I have the schedule setup to run every 15 minutes now. Haven't missed a 15 minute increment yet, and have run 94 times so far (it's a conversion job).

    It's not a big deal though if it goes beyond the 15 minutes.

    Thanks

Viewing 7 posts - 1 through 6 (of 6 total)

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