DEV Community


Discussion on: Strapi, another use case: Build your own API from any website with Puppeteer

hichamelbsi profile image
ELABBASSI Hicham Author • Edited

Your welcome.

Well, it should work. Can you confirm that your Strapi server CRON configuration is set to true in config/environments/development/server.json.

Also, keep in mind that the CRON task in this example will be executed every 24 hours. Did you wait 24 hours to test the case? Maybe you should modify the CRON expression to execute your script every minutes just to test if the script works well.

"*/1 * * * *": (date) => {

Don't forget to stop the server after the test :D

Thread Thread
dkp1903 profile image
Dushyant Pathak

It works, sir. Forgot about the 24 hour thing. Switched it to a minute and it works right as rain.

Thanks a million!

Forem Open with the Forem app