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

It's not possible to use pipes with cron-sentry #15

Open
hltbra opened this issue Oct 21, 2015 · 1 comment
Open

It's not possible to use pipes with cron-sentry #15

hltbra opened this issue Oct 21, 2015 · 1 comment

Comments

@hltbra
Copy link

hltbra commented Oct 21, 2015

Currently it's not possible to use have commands that use the shell capabilities. For example, it's not possible to wrap completely the following command with cron-sentry:

ls /dir | mycommand

With cron-sentry it would be possible to wrap the ls /dir part, but not the whole thing (unless cron-sentry is executed twice). So, if the ls command works, but mycommand fails, cron-sentry wouldn't catch it.

The above is true for |, ||, &&, >, >>, etc.

@dvarrazzo
Copy link

I didn't see this fork, and fixed that in the original project at https://github.com/mediacore/raven-cron/pull/7

In short, call() should be passed shell=True if there is exactly one token in the command line. In that case raven-cron "foo | bar" would honour the pipe. The bug in the original library was actually the opposite: they used shell=True with multiple tokens, e.g. raven-cron foo bar baz, with the result that the extra token were ignored.

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

No branches or pull requests

2 participants