Search code examples
angulargetpostman

Call a Rest API without FE application for every 10mins


I want to schedule a GET API call every 10 minutes without using a front-end application.

Note: Unable to use the scheduler, because of my requirements.

Consider my API is https://xvyz.com/keep-alive

Is there any possible way to achieve this API call without opening an application or using Front end!


Solution

  • The best solution is to use a scheduler which is available in your programming language, (java has its own scheduler) using this scheduler call the method of the API every 10 minutes.


    You can also use a cron job, on the server you can add a cron job and trigger the API call every 10 minutes

    setting cron job in unix

    cron job every 10 minutes

    */10 * * * * curl -X POST -d '{"message":"content"}' https://xvyz.com/keep-alive