I’m having an issue with getting particular scheduled jobs to run at the correct time.
I currently have 5 scheduled jobs, three of which run perfectly, and the other two causing issues.
I have the jobs set up to run every hour one at 59 minutes past the hour( “59 * * * *” ), and the other at 21 minutes past the hour ( “21 * * * *” ).
The jobs are supposed to do the same thing, but I need them to run every half an hour, and with Wix limiting CRON jobs to every hour, my solution was to add the CRON job twice, and make a second .jsw file also.
I’ve since noticed, that no matter what I change the CRON expression to, only one job is running, and at 41 minutes past the hour. Which I believe is a time I used at some point yesterday while testing. I have published my site and tried a variety of other times, to no result.
Any idea what could be going wrong here? The functions themselves are running perfect when tested, it’s only the scheduler that is not working.
jobs.config file below. the checkLateCaptain and checkLateCaptainTwo are the problem jobs
// /backend/jobs.config
{
"jobs": [
{
"functionLocation": "/checkExpiredJobs.jsw",
"functionName": "checkExpiredJobs",
"description": "Notify if jobs expired",
"executionConfig": {
"cronExpression": "13 12 * * *"
}
},
{
"functionLocation": "/checkLateCaptain.jsw",
"functionName": "checkLateCaptain",
"description": "Checks for late captains ",
"executionConfig": {
"cronExpression": "59 * * * *"
}
},
{
"functionLocation": "/checkLateCaptainTwo.jsw",
"functionName": "checkLateCaptainTwo",
"description": "Checks for late captains twp",
"executionConfig": {
"cronExpression": "21 * * * *"
}
},
{
"functionLocation": "/checkClockedOut.jsw",
"functionName": "checkClockedOut",
"description": "Auto Ends unfinished jobs at 22:55",
"executionConfig": {
"time": "22:55"
}
},
{
"functionLocation": "/reviewChase.jsw",
"functionName": "reviewChase",
"description": "triggers review email",
"executionConfig": {
"cronExpression": "* 16 * * FRI"//
}
}
]
}
Thanks for any help. Feels like the system isnt taking my updates to the scheduler, but no idea how to force it.