Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inotify is not working #186

Open
lijc210 opened this issue Feb 24, 2025 · 0 comments
Open

inotify is not working #186

lijc210 opened this issue Feb 24, 2025 · 0 comments

Comments

@lijc210
Copy link

lijc210 commented Feb 24, 2025

Hello,

I'm encountering an issue with the inotify functionality in the SuperCronic Docker image.

Environment:

Image: supercronic:latest
Command used to run SuperCronic:

docker-compose.yml

supercronic:
  image: supercronic:latest  
  user: root
  container_name: supercronic
  ports:
    - "9746:9746"
  volumes:
    - $WORKCONF/supercronic/my-crontab:/etc/crontab
    - $WORKCONF/supercronic/script:/script
    - $WORKDATA/supercronic/logs:/var/log
  command: -inotify -debug -prometheus-listen-address 0.0.0.0:9746 /etc/crontab 

Issue Description:
When I add a new cron job to $WORKCONF/supercronic/my-crontab, SuperCronic detects the file change via inotify:

time="2025-02-23T15:02:04+08:00" level=debug msg="event: CHMOD         \"/etc/crontab\", watch-list: [/etc/crontab]" 

However, the newly added cron job is not loaded or executed.

Steps to Reproduce:

  • Add a new cron job to $WORKCONF/supercronic/my-crontab.
  • Observe SuperCronic logs to confirm it detects the file change.
  • Verify that the new cron job is not executed as expected.

Expected Behavior:
The new cron job should be loaded and executed immediately after being added to the crontab file.

Actual Behavior:
The new cron job is detected by inotify, but it is not loaded or executed.

Additional Information:

  • I have verified that the permissions and ownership of the crontab file are correct.
  • The SuperCronic container is running with root privileges.
  • Other changes to the crontab file (e.g., modifying existing jobs) are detected and applied correctly.

Any help or insights would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant