how to schedule a API on apigee?

Not applicable

I am trying to schedule an API on Apigee edge without using a local platform. For that, I already try to write a code in javascript but on Apigee edge I am unable to use require and other node modules in java script.

0 5 1,242
5 REPLIES 5

Hi - I don't know what you mean by "schedule an API".

Think of APIs as endpoints, or interfaces that handle inbound requests. These endpoints will cause some logic to be executed. In Apigee Edge you do not "schedule" an API to run. If you want to make the logic behind an API execute, then you send in the appropriate request.

If you're looking for a generic nodejs hosting solution, that may support scheduling, then I suggest you consider Google App Engine!

Good luck!

Not applicable

Actually, we can schedule an API in Apigee by using node.js app. I am using request and cron method to schedule an API. And we can install cron library by using it:-

https://community.apigee.com/articles/50832/step-by-step-procedure-to-add-a-node-module-to-a-f.html

you can write this type of code in your app.js(hello-world.js) file

6965-screenshot-3.png

Yes, it seems you can run cron in a nodejs app. And you can run that in Apigee Edge.

Note that you may have to deal with multiple instances of your proxy running. I think in public cloud deployments there's a minimum of 2 MP's and that may grow?

that is a good point! thanks.