HomeT-SQLTSQL-Wait for a specific time of day in a SQL Agent job step

Comments

TSQL-Wait for a specific time of day in a SQL Agent job step — 1 Comment

  1. Thanks a bunch for sharing this script. I do need some help around an issue. I have a job that is required to start only when it is midnight. I need to generate a script to wait for delay until it is midnight before the job will kick off. if the step above the job completes before midnight, it needs to wait until it gets to midnight before it kicks off. Again, if the step above it completes a little after midnight, it needs to validate that it is already midnight and the job can kick start without waiting for delay for another midnight. Would really appreciate a help around creating this code.
    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *