15 Commits

Author SHA1 Message Date
Maximilian Hafer
cca6b3a90a add support for -version flag (#175) 2024-10-10 15:57:56 -06:00
Fei Yang
8b4edf5920 refactor: reap zombie process and opt-out with no-reap flag (#172)
* fix: random waitid error

fix https://github.com/aptible/supercronic/issues/171

* fix(reap): forward signal

* refactor: modify reaper to get supercronic exitStatus

* fix(reaper): unify signal list & fix signal forward

* chore: replace ioutil to io

* fix(test): ci timeout

* opt-out with no-reap flag

Co-authored-by: Josh Raker <48493233+joshraker@users.noreply.github.com>

* fix: typo on signal

* fix: args pass to supercronic

* fix(test): remove removed flag

* chore: remove misleading comment

---------

Co-authored-by: Josh Raker <48493233+joshraker@users.noreply.github.com>
2024-10-10 12:44:43 -04:00
Maximilian Hafer
19d79a3545 Add inotify support (#168)
* implement inotify support

* add integration test and fix wron crontab name for updated fsnotify monitor

* Update README.md

* fix typo in readme

---------

Co-authored-by: YannikBramkamp <74957914+YannikBramkamp@users.noreply.github.com>
2024-09-12 11:53:49 -06:00
Fei Yang
32e229c987 fix: zombie process & upgrade bat & go (#164)
* fix: reap zombie process

https://github.com/aptible/supercronic/issues/88

* upgrade bats

* chore: upgrade go to 1.23.0 and upgrade dependencies

* go: upgrade to 1.23.0 on github workflow

---------

Co-authored-by: Anton S <coder.root@gmail.com>
2024-09-03 12:16:12 -06:00
Thomas Orozco
7001f7b6a9 Add -pasthrough-logs
This adds support for not capturing logs at all, and instead just
passing them through. This has come up in a number of issues:
 #54, #55, #57, #65.
2020-07-04 13:05:03 +01:00
Thomas Orozco
e7ecf3f459 Add overlapping flag
This allows overlapping instances of a given job. To make this easier to
test, this also refactors `StartJob` into a helper `startFunc` to make
this functionality easier to unit test.

Co-authored-by: Pavel Popov <pavelpopov@outlook.com>
2019-02-08 15:28:32 +01:00
Magnum5234
62c14a9202 Reload crontab on SIGUSR2 2019-02-08 14:13:34 +01:00
Thomas Orozco
b5b2a274d8 Add a -test flag
This allows verifying the syntax of a crontab, without running it.
2019-01-07 19:23:44 +01:00
Thomas Orozco
398e49a968 Use a context to exit after being signalled
Using a (cancellable) context is a little more idiomatic than
re-implementing one using a channel, and it's a little more efficient
(since we share one context across all job goroutines, as opposed to
requiring one cancel channel per goroutine).
2018-04-23 14:38:06 +02:00
Thomas Orozco
9a964c8cb5 Warn when a job should start but is still running
This will make it easier for users to debug hung jobs: rather than
requiring users to go back to when the job started to realize
(implicitly) that it's not running, this will warn at every interval
that something is wrong.
2018-01-10 13:49:49 +01:00
Thomas Orozco
1000379aae Add Travis 2017-07-11 13:34:38 +02:00
Thomas Orozco
7bf5451157 Integration: test that it actually runs a cron 2017-07-11 12:56:20 +02:00
Thomas Orozco
2f166eb88f Add flag handling (debug, json logging) 2017-07-11 12:56:20 +02:00
Thomas Orozco
8ae7f372c7 Unify ENV handling with Vixie cron's 2017-07-11 12:56:20 +02:00
Thomas Orozco
3522b1ec95 Add integration tests 2017-07-11 12:56:20 +02:00