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.
Hello Dushyant,
Can you see your content type in the Strapi admin page? Can you share your CRON task script please?
Thanks for the reply, sir.
Yes, I can see the content-type, Jobs, in the admin page.
Here is my CRON script(functions/cron.js)
gist.github.com/dkp1903/d598e143ea...
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.
Don't forget to stop the server after the test :D
It works, sir. Forgot about the 24 hour thing. Switched it to a minute and it works right as rain.
Thanks a million!