Current Issue


Table of contents

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 12.0

Version 12.0 delivers every issue of Sys Admin from 1992 through 2006 and every
issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!

Sys Admin Magazine > Archives > 1992 > 9202
Article Listing 1 Listing 2 Listing 4

Listing 3

1: #
2: # Template for generalized overnight OR background task driver script:
3: #
4:
5: echo                        # Announce the nature of the application
6: echo "(Name of report)"
7: echo
8:
9: debug=Y                     # to support testing
10:
11: AppId=report                # AppId is short description of application
12: Ltmp=/tmp                   # Work/Log area for the app, publicly writeable
13: UseLock=Y                   # Y to use lockfiles, N not to
14:
15: if [ $UseLock = Y ]; then
16:     LOCKFILE=$Ltmp/$AppId.LOCK  # Name of lockfile
17:     LOCKOPT="-l $LOCKFILE"      # bgrun.sh lockfile option
18: fi
19:
20: onite=`ask.sh "Do you want to run these reports overnight"`     # get Y/N
21:
22: if [ $onite = N ]; then                 # If requesting background \execution,
23:     if [ $UseLock = Y ]; then           # and using a lock file,
24:         if [ -r $LOCKFILE ]; then       # then check for lock file
25:             echo "\nSorry, a related report is running. Please try later."
26:             exit 1
27:         else                            # no active lockfile found.
28:             trap "rm $LOCKFILE; exit 1" 1 2 3 9 14 15
29:             touch $LOCKFILE             # create the lockfile
30:         fi
31:     fi
32: fi
33:
34: if [ $debug = Y ]; then                 # If debugging, create output file
35:     outlog=$AppId.o

				  



MarketPlace

Instant Answers to Your IT & Business Questions
Sign Up & Get Full Access To The Definitive Online Book Collection With SkillSoft's Books24x7�.

NEW! Numara FootPrints 9 - Service Desk Management
IT Service Management that Delivers. Real Value. Real Flexibility. Real Results. Free Demo.

BugSplat - Automatic Crash Analysis
Fast online exception analysis. Capture customer crash data online.

Flowcharts from C/C++ code -- Free trial download
Understand C/C++ code in less time. A new team member ? Inherited legacy code ? Get up to speed faster with Crystal Flow for C/C++. Code-formatting improves readability. Flowcharts are integrated with code browser. Export flowcharts to Visio.

Wanna see your ad here?