Also initially load crontab jobs
This commit is contained in:
BIN
crontabd/crontabd.exe
(Stored with Git LFS)
BIN
crontabd/crontabd.exe
(Stored with Git LFS)
Binary file not shown.
@@ -59,6 +59,11 @@ func main() {
|
|||||||
logger.Error("Failed to watch crontab file: %v", err)
|
logger.Error("Failed to watch crontab file: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
err = loadCronJobs()
|
||||||
|
if err != nil {
|
||||||
|
logger.Error("Failed to load initial cron jobs: %v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
for event := range events {
|
for event := range events {
|
||||||
logger.Info("Crontab file updated: %s", event.Name)
|
logger.Info("Crontab file updated: %s", event.Name)
|
||||||
// Reload cron jobs when file changes
|
// Reload cron jobs when file changes
|
||||||
|
Reference in New Issue
Block a user