-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support for the MAILTO env var
- Loading branch information
Showing
2 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,12 +26,17 @@ Usage | |
|
||
When adding a command in crontab, prefix it with `croncape`: | ||
|
||
0 6 * * * croncape -e "[email protected]" ls -lsa | ||
[email protected] | ||
0 6 * * * croncape ls -lsa | ||
|
||
That's it! | ||
|
||
You can also send emails to more than one user by separating emails with a comma: | ||
Note that the `MAILTO` environment variable can also be defined globally in | ||
`/etc/crontab`; it supports multiple recipients by separating them with a comma. | ||
|
||
Alternatively, you can also the `-e` flag to define emails: | ||
|
||
0 6 * * * croncape -e "[email protected]" ls -lsa | ||
0 6 * * * croncape -e "[email protected],[email protected]" ls -lsa | ||
|
||
Besides sending emails, croncape can also kill the run command after a given | ||
|
@@ -52,7 +57,9 @@ Croncape is very similar to [cronwrap][2], with some differences: | |
more time to execute); | ||
|
||
* Tries to use `sendmail` or `mail` depending on availability (cronwrap only | ||
works with `sendmail`). | ||
works with `sendmail`); | ||
|
||
* Reads the email from the standard crontab `MAILTO` environment variable. | ||
|
||
For a simpler alternative, have a look at [cronic][3]. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters