aptible / supercronic

Cron for containers
MIT License
1.93k stars 118 forks source link

Reaper doesn't look for supercronic in PATH #177

Open atesca09 opened 1 month ago

atesca09 commented 1 month ago

Since #172 in v0.22.3 I'm getting

time="2024-10-12T08:43:03+02:00" level=info msg="reaping dead processes"
time="2024-10-12T08:43:03+02:00" level=fatal msg="Failed to fork exec: no such file or directory"

I debugged that behavior to https://github.com/aptible/supercronic/blob/cca6b3a90abc99a024f4b437da0f1886da68ca7a/reaper.go#L34

If the current working dir is / but supercronic is installed in a directory included in PATH e.g. /usr/local/bin/supercronic the reaper still tries to execute supercronic from / which doesn't exist there.

qianlongzt commented 1 month ago

I made a fix, you can try it. @atesca09

https://github.com/aptible/supercronic/pull/178

atesca09 commented 1 month ago

Thanks for the prompt fix! I've tested the changes, and it works for me now.

Etheonor commented 1 month ago

Same issue using Supercronic on a wolfi docker image