Permission denied

Permission denied return code was 126.

The strange thing is that we have been scheduling the same task from a long time and it never failed earlier.

I must mention that we updated the scheduled task recently and it is a bash script. After reading this I think the permissions got messed up. Do we need to execute chmod +x /path/to/your.file every time we update the script we are scheduling?

That sounds like it might be the problem. You don't need to chmod the script if you've just edited it (say, from the "Files" tab or using vim from a bash console), but if you delete it and then re-create it, then yes, you need to update the permissions again.

No we didn't delete it. The script was updated via git pull

Hmm, that might be the problem -- git keeps track of the permissions it expects a file to have, so if it thinks that the file should be non-executable, it could well "fix" it when you do the pull.

Is your working repository (as in, the place you git push from) on a Linux machine or a Mac? If so, you can chmod +x it there, then commit that permissions change -- then the repo will have the correct information, and future push/pulls won't break things.

Thanks, have a good one.