Hi,
When I setup the jobs.config file to run the function read out the data from “Forum/Posts” ', it doesn’t work due to the permission deny.
I used site monitor and it shows the followings.
‘Error: Permission denied: Insufficient permissions.’
I’ve also tried to run the exact same function in review and site mode. Both of them work well. The test function is as following:
export function testPermission(){
let options = {
"suppressAuth": true,
"suppressHooks": true
};
console.log(options);
wixData.query("Forum/Posts")
.find(options)
.then((results) => {
console.log(results.items[0]);
});
}
My schedule function is:
// /backend/jobs.config
{
“jobs”: [
{
“functionLocation”: “/tools.jsw”,
“functionName”: “testPermission”,
“description”: “Testing”,
“executionConfig”: {
“time”: “21:54”
}
}
]
}
I suspect it is due to the different mechanism of the job scheduler?
I’m new to wix coding. Does anyone have any idea about how to solve this problem?
Many thanks in advance.