Line 1... |
Line 1... |
1 |
# /etc/cron.d/mapswitches: crontab to map network switches
|
1 |
# /etc/cron.d/mapswitches: crontab to map network switches
|
2 |
|
2 |
|
- |
|
3 |
SCRIPTPATH=/path/to/script
|
- |
|
4 |
HTMLPATH=/path/to/document/root
|
- |
|
5 |
|
3 |
# run once an hour at some odd time
|
6 |
# run once an hour at some odd time
|
4 |
9 * * * * root perl /path/to/mapSwitches.pl
|
7 |
9 * * * * root perl $SCRIPTPATH/mapSwitches
|
5 |
# run once daily to turn the YAML into a CSV for someone to read
|
8 |
# run once daily to turn the YAML into a CSV for someone to read
|
6 |
12 12 * * * root perl /path/to/mapSwitchesShow.pl > /path/to/report.csv
|
9 |
12 12 * * * root perl $SCRIPTPATH/mapSwitchesCSV.pl > $HTMLPATH/mapswitches.tsv
|
7 |
# run once a day to turn the YAML into an HTML page
|
10 |
# run once a day to turn the YAML into an HTML page
|
8 |
13 12 * * * root perl /path/to/mapSwitchesHTML.pl > /path/to/web/documentroot/mapswitches.html
|
11 |
13 12 * * * root perl $SCRIPTPATH/csv2html -c mapSwitches.css -t MapSwitches --h2 "Created <a href='mapswitches.tsv'>mapswitches.tsv</a><br />`date`" $HTMLPATH/mapswitches.tsv > $HTMLPATH/mapswitches.html
|