Wix cron job using wix code

Can anyone explain how can we run cron job in config file ? I want to run my backend code every hour .can you please provide me the format to create the wix cron that run every hour

Take a look at job scheduler’s cronExpression

The document here provides all the details on how to setup jobs.

I found that but dont know how can we set that to run every hour like cronExpression": “20 0-23/1 * * *” . I want to run that suppose every 20 Mins then what need to write in cron expression . Can you please help ?

@sharmakrishankant9 You cannot run jobs every 20 mins. the minimum you can do is 1 hour and the cron expression for every hour is:

"cronExpression": "0 * * * *"

0 means that the job will run at 0 minutes of each hour. Example: 12:00, 1:00, 2:00, 3:00

If you replace 0 with 5 it will run on the 5th minute of each hour. Example: 12:05, 1:05, 2:05, 3:05


I wrote the code in the backend function.jsw file and here is the cron job settings ,but why it didnt perform the task.

Like I said, read the support article . You are not doing it correctly. There is no folder on your backend called backend

@shantanukumar847 Got it. Thats working fine now. Thanks for the Help. :slight_smile: