Hi, how can I limit the number of executions per day of my job? Currently I’m using a webhook, but I would like to ignore it, after a certain number of executions per day, or something like that. Thanks!
Hi @MyWay,
There are many ways to do it.
- You can store your execution count by workflow per day in wherever you want (DB, Redis, Google Sheet etc.). And then you can fetch your execution count to decide to run the current execution.
- Unofficial n8n rest apis can be used but if your volume is high, you cause an extra load to the n8n.
- If you are using external database for n8n, you can easily get what you want. Be sure that your db server is strong and avoid locking rows while querying
Although I have enterprise level environment, I would prefer 1st option for my cases. This is the safest way to do it.
Hope it helps…
3 Likes
Hey @MyWay,
Welcome to the community
There is an example workflow here: https://n8n.io/workflows/1236 that does a part of what you are after and it wouldn’t take much to convert it to a daily limit.
You could also use static data within your workflow if you wanted to keep it all within the worklfow.