Timers like Cron jobs

I could pay extra for a package where you could setup timers. if you create code in folder backend and on top line add

script.Timer = “60”;

as an example that code will be executed every 60 minutes.

this would be awesome

Thanks, it’s on our backlog…
could you elaborate a bit about the things you’d like to run under such a mechanism?

thanks!

Yes of course.

  1. Cleaning up data collections from data that is old
    I create a news magazine and after 180 days I want to delete or archive records. Then I can check them on a daily basis.

  2. Getting or sending batch data to or from WIX
    Maybe I want WIX to send data to our CRM on an hourly basis or getting updated data from a system.

  3. Changing data on site
    Instead of getting weather info in real time I could just poll the weather API once a minute and update a local storage. Would increase page loading speed.

  4. Sending daily digest from my site to users
    I could execute a script once a day to collect all my news and send that to sendgrid once a day.

  5. Integration with e-mail services
    I could poll an email account every hour and get emails from that account and store them in my WIX crm.

It just extends WIX by far having this service. It could be a paid service on top of other plans. Running 1000 scheduled jobs a month could cost X dollars.

Excellent use cases!
exactly what we had in mind.

BTW, as for #3, your site does not have to wait for the call to complete before loading.
since your call to the external service returns a promise, the loading process waits for it to resolve only if you ask it to.

for example, assuming you call the service from “on ready”, if you return that promise as the return value of the function then the system will wait for it to resolve.
but if you just return nothing, the render will start immediately and later when the promise is resolved the weather data will get updated as well.