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

Add on_success and on_failure command hooks #11

Open
WillDaSilva opened this issue Sep 20, 2022 · 0 comments
Open

Add on_success and on_failure command hooks #11

WillDaSilva opened this issue Sep 20, 2022 · 0 comments

Comments

@WillDaSilva
Copy link
Member

@longtomjr suggested the following in the original issue for cron-ext:

I don't know if it will be out of scope for this feature request, but it might be valuable to have an option to integrate with cron / dead man's switch tools like https://healthchecks.io/.

It might also be valuable for setups based on the proposal at #5962.

The simplest way I can think of would be to add a way to have an option for an extra command that will be be added to the cron entry.

So instead of generating

0 0 * * * (cd /project && meltano run ...) 2>&1 | /usr/bin/logger -t meltano

meltano generates the following cron

0 0 * * * (cd /project && meltano run ...) 2>&1 | /usr/bin/logger -t meltano && <user defined command here>

It should be possible to specify these on_success/on_failure commands in meltano.yml as a setting for the cron utility (accessible to cron-ext as an environment variable), or by providing them with command-line flags.

A list of commands can be provided to be run in order on success/failure as appropriate.

Non-zero exit codes from the on_success/on_failure commands will be ignored.

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