Scheduled import

Hello,

We are currently working on a DatoCMS project which includes an integration to a PIM system. The data from the PIM need to be synced every night or more.
I’ve been trying the content management API to import data and it works great.

But now to my question. Which is the best practice for creating a scheduled import job. Should I create a plugin in Dato which runs the import or should it be run from the outside of the CMS?

Best regards,
Joel

Hello @joel.Mohlin and welcome to the community!

A cronjob that triggers the REST API calls is the best way to go for this case, as with the plugins, if no one opens the Dashboard on that time, the calls won’t be executed.

There are a couple of services that allow for lambda cronjob functions, which would be a perfect fit for your use case, such as Scheduled Functions | Netlify Docs

1 Like

Thanks a lot for the answer! :slight_smile:
This helped us to choose a way.