Why does my daemon job not automatically restart?
I have a job that runs in daemon
mode, which does not automatically restart after an error.
In Code Engine, if you want your job to run indefinitely and not time out, you can specify to run the job in daemon
mode.
If the container image for your code that is associated with your daemon job ends with a 0
exit code, Code Engine assumes that the job was stopped intentionally, and the job is not restarted.
Code Engine automatically restarts a job that runs indefinitely if the code for the container image that is associated with the daemon job exits with a nonzero exit code. So, if the daemon job fails for an unexpected reason, such as an out of memory condition, then Code Engine automatically restarts the daemon job when the code ends with a nonzero exit code.
For more information, see Creating and running a job that runs indefinitely