-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
151 additions
and
91 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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
## Introduction | ||
|
||
Default Unix and linux cronjobs are quite basic stuff. Mostly you create | ||
"simple, stupid" jobs without output ... that just run. Or should. | ||
|
||
If you use a cronjob you need to hide the output otherwise the root user gets an | ||
email. So if you generate the output and have many cronjobs then you need a | ||
convention how to name your log files. | ||
|
||
Questions: | ||
|
||
* How do you check if a job was successful? Just trust them? Watching each log? On each of your systems? | ||
* How do you detect if the last job execution was successful but does not run anymore? | ||
|
||
My simple approach: | ||
|
||
By just adding a wrapper in front of your current command | ||
breaks tons of limits! Suddenly a simple action opens so many possibilities. | ||
|
||
This repository contains scripts and helpers for local cronjobs | ||
|
||
* cronwrapper.sh - a wrapper script to call cronjob scripts | ||
* inc_cronfunctions.sh - an include file that can be sourced in your bash scripts | ||
* cronstatus.sh - ist shows status of all local cronjobs (and use cronwrapper.sh) | ||
* cronlog-sync.sh - syncs logfiles to a central log server | ||
|
||
To sync logfiles to a central log server there is script that detects new files in the logdir since the last sync. | ||
|
||
## Requirements | ||
|
||
Linux system with installed Bash. | ||
Tested on CentOS, Debian, Manjaro, Ubuntu. | ||
|
||
I would say it runs on every system with GNU Bash. Non-GNU Bash was not tested. |
File renamed without changes.
File renamed without changes.
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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