How to create a background process


#1

Hi, i need create a background process to for example queries in my database in times defineds.

How to create for every 10 minutes?


#2

What are you trying to achieve?

But anyway, you can use


or

or both :slight_smile:


#3

Hey @mauriciolucas22! :wave:

You can simply create an Ace Command and run a cronjob every 10 minutes that trigger this command.


#4

Agree with the cronjob approach. Or if you need to do it in an environment you cannot configure cron in for whatever reason, another option would be to expose a route that triggers the necessary action, and setup a cronjob elsewhere that hits that route every 10min