I want to schedule some jobs in sql server express edition. After digging a bit i got few post like:
How to run a stored procedure every day in SQL Server Express Edition?
How to create jobs in SQL Server Express edition
How to run a stored procedure every day in SQL Server Express Edition?
and i understand that Sql Agent is require to schedule a job in sql server but since SQL Server express does not come with SQL Agent so i have to go with some other alternative.
And i got this, which suggest good and easy alternative. Here in @Thomas Bratt's answer he used infinite loop and waitfor (Transact-SQL)
Code from @Thomas Bratt's answer
I want to know the performance impact (if any) of this code.
...
while 1 = 1
begin
waitfor time @timeToRun
begin
execute [MyDatabaseName].[dbo].[MyDatabaseStoredProcedure];
end
end
...
and in the same post @Raj More suggest another alternative i.e Windows Scheduler, so which one is better to use Windows Scheduler or waitfor (Transact-SQL) with infinite loop ??