A change in the jobs.config definition for Job Scheduler feature was made.
Until now, the configuration contained one property ‘functionLocation’ for the location of the job function, which included both the file path and the function name .
Going forward, the file path (including the file extension) will appear in one property - ‘functionLocation’ and the function name will now appear in a second property - ‘functionName’.
If you’re using scheduled jobs in your website please make sure to use the new format.
Note: this is not a breaking change - existing format will still be supported in the next weeks and the jobs.config file will automatically be migrated to the new format.
// The new format:
{
"jobs": [
{
// first job object
"functionLocation": "/utils/dbUtils.js",
"functionName": "deleteExpired",
"description": "Delete the expired DB items",
"executionConfig": {
"time": "22:00",
"dayOfWeek": "Sunday"
}
},
{
// second job object
}
]
}
Sorry Wix but that’s a really shitty way to announce a breaking change!
Announce the change in advance
You should announce that a least a few weeks in advance. We need to warn our client about the change/book time to fix our code and avoid downtime.
Announce the change officially
You should Officially announce breaking changes. Only a few people are browsing the forum daily. That can easily be miss by many. You could create a release note like any of your competitors and major web company:
That is not a breaking change. Thanks for pointing out, the post will be updated to emphasize that. Existing format will be supported and Wix will make sure all users migrate to the new format.
@plomteuxquentinI think it was sent to all the users who have a jobs.config file in their site. I’m not sure but that’s what I can conclude because I have the file on 14 of my sites and I ended up receiving the same email 14 times all at once.