I wanted to write a Api that calls every minute in my application.
I have tried the scheduler in firebase but in wanted to write it in my application.
please find the solution for this problem. that would be helpful.
thank you
I wanted to write a Api that calls every minute in my application.
I have tried the scheduler in firebase but in wanted to write it in my application.
please find the solution for this problem. that would be helpful.
thank you
2
Answers
You can use a cron job and schedule it for every minute.
The node-cron library allows you to schedule tasks to run at specific intervals using cron syntax.
Example:
* * * * *
– This will generate a function every minute. You can customize it as per your requirementsFor the generate cron job string you can use this link