Scheduling the Execution of a Function

Problem: We need to be able to execute code while the client is not active, but currently there’s a limitation to backend code where it will timeout after 14 seconds of running. This is obviously to prevent bloating and having everyone run wild with shit. I get that. But it also means that any code has to be done doing its shit while the client is still active, or 14 seconds after the client was active.

Solution: Give us a place in the Wix editor where we can write a code block and tell Wix the time and date to execute it, so we can execute code while the client is not active.

Why?: I wan’t to be able to write code that can wait for a certain date or time before executing itself. With that capability I could do things like:

1: Giving my clients the ability to schedule their posts (I get this request a lot)
2: Set up form submissions that automatically closes down at the given deadline
3: Schedule my site to automatically change themes based on the season
4: Change the layout of the site based on the time of day
5: Etc.

Summary: If there was some way that I could enter a code block and tell Wix (dynamically or statically) to execute the code block at a given time, it would open up for a lot of really useful features.

Give us the power Wix Development team

Hi Samuel,

Thanks a lot for your feedback! we are just about to release a new capability called ‘scheduled jobs’, which will allow you to schedule an execution of a function you have in the backend code of your site.
you can set up a daily/weekly schedule for example and your function will be executed regardless of an online user presence.

please let me know if you want to join the alpha program for this feature and share your feedback with us.

thanks,
Shlomi

Omg, I would love to be part of the alpha program. This is great news. Much love to the Wix development team.

@samuelmorkbednarz can you please share your email so i can contact you with the details?

Hello Shlomi ,

I have been using this great job feature which calls the backend function to update some rows in my table , however there is little caveat to it , For some products(table in backend) I have 10,000 of records and to update the whole table the scheduled job takes more than a minute to run . But after a minute any attempt to update the table is rejected and i can see [WD_UNKOWN_ERROR] in my dashboard . Why does it not update after a minute . Is a minute a threshold in WIX for jobs .