I have a scheduled job which runs nightly. I want it to stop itself at 07:00AM in the morning whether or not it is completed.
I have seen some duplicates in the site but they don't exactly address the problem.
Thanks.
SQL Server Agent – How to Stop Job After Certain Hours
sql serversql-server-2008sql-server-2008-r2sql-server-agent
Related Question
- Sql-server – Stop and Start the Instance In a Job
- Sql-server – T-SQL script doesn’t delete files when run as an agent job – does if run manually
- Sql-server – Statistics disappearing/empty randomly throughout the day
- SQL Server Agent – How to Copy a SQL Agent Job on Same Server
- SQL Server – How to Stop SQL Job if It Runs Past a Certain Time
Best Answer
Personally I would create another job and schedule it to run each morning at 7am.
A job step within that job could execute something like