agnieszka
agnieszka

Reputation: 15345

Trigger fired in periods

Can I make a trigger that is fired every x hours?

Upvotes: 0

Views: 121

Answers (3)

Eugeniu Torica
Eugeniu Torica

Reputation: 7574

If you are using SQL Server you can use SQL Server Agent for doing repetitive jobs.

Upvotes: 2

bogertron
bogertron

Reputation: 2355

No, Triggers are dependent upon rows being inserted, updated or deleted. The only way that you could have a trigger fire every few hours is to create a separate table and insert a row every few hours. shahkalpesh is correct, this was not the intended functionality for a trigger

Upvotes: 0

shahkalpesh
shahkalpesh

Reputation: 33474

That is what Scheduled Jobs are for.
See if this helps.

Upvotes: 6

Related Questions