1. SQL Server Job creation: (SQL Server Agent-job) right mouse button, new job.
2. General Options: Define the job name, and description information.
3: "Step" option: New step
4: Define the step name, set the corresponding database, and write the T-SQL script.
Parsing the script (to ensure the correctness of the script)
5: "Schedule" option: New execution plan
Set the scheduled period for execution: (currently set to daily, 10s interval)
Click Confirm to complete the creation.
Right-click Start SQL Server Agent. Start the corresponding job.
Job Activity Monitor to view the start and run status of a job.
Select a specific job, right mouse button, and select View history to view the execution record information for the current job.
You can see that the execution time and job execution settings are consistent, and each interval of 10s is executed once.
Note: After the database server restarts, you need to start the SQL Server Agent service. Otherwise the job will not be executed.
SQL Server Job