SlideShare uma empresa Scribd logo
1 de 3
Baixar para ler offline
Step 1 (Create Stream Directory):
I recommend this be kept in a central location for all your jobs. It will make recovery and trouble
shooting much easier. For this Stream I created SHDRAD in /opt/scripts/JobStream

Step 2 (Create Sub-Directories):
bin = Where your launcher scripts are kept (required)
log = Where stdout and stderr are redirected (jobStream.sh can create this on the fly if
necessary)
run = Where the lock file for jobStream.sh is stored during its run this prevents the same job from
running multiple times if the first stream has not finished.
tmp = Where stdout and stderr are redirected during the run then moved to log
Only bin is requied to be created up front because you have to have a place to store your
launcher scripts, the others can be created by jobStream.sh if necessary, but is recommended to
create them up front to avoid failures.

james@localhost:/opt/scripts/JobStream> cd SHDRAD
james@localhost:/opt/scripts/JobStream/SHDRAD> ll
total 4
-rw-r--r-- 1 james users         231 Oct 11 15:49 SHDRAD.lst
drwxrwxr-x 2 james users            96 Oct 11 15:42 bin
-rw-r--r-- 1 james users          21 Oct 11 15:50 contacts.lst
drwxrwxr-x 2 james users            96 Oct 11 15:39 log
drwxrwxr-x 2 james users            96 Oct 11 15:39 run
drwxrwxrwx 2 james users             96 Oct 11 15:39 tmp

Step 3 (Create the Launcher scripts):
Launcher scripts can be simple commands or complex shell scripts. Here are the ones I created
for SHDRAD.
james@localhost:/opt/scripts/JobStream/SHDRAD> cd bin
james@localhost:/opt/scripts/JobStream/SHDRAD/bin> ll
total 4
-rwxrwx--- 1 james users           147 Oct 11 15:46 cleanLog.sh
-rwxrwx--- 1 james users            64 Oct 11 15:41 launchSHDRAD.sh

The obvious one is launchSHDRAD.sh, which launches the rc.startjob for executing the Baan job
SHDRAD.
james@localhost:/opt/scripts/JobStream/SHDRAD/bin> cat launchSHDRAD.sh
#!/bin/sh
BSE=/msl4/baan;
/opt/etc/rc.startjob SHDRAD;
exit $?;

Since jobStream.sh stores all log files from all runs I created a simple cleanup program for
SHDRAD, which will run if SHDRAD completes successfully, otherwise it will not run at all (I'll
explain that in a bit).
james@localhost:/opt/scripts/JobStream/SHDRAD/bin> cat cleanLog.sh
#!/bin/sh
MYLOG=/opt/script/JobStream/SHDRAD/log;
cd $MYLOG;
find . ( -f -ctime +30 ) -exec rm -f {} ;
ERR=$?;
cd -;
exit $ERR;
Step 4 (Create Job List):
I created the job list for SHDRAD directly under the main directory for the stream.
james@localhost:/opt/scripts/JobStream> cd SHDRAD
james@localhost:/opt/scripts/JobStream/SHDRAD> ll
total 4
-rw-r--r-- 1 james users           231 Oct 11 15:49 SHDRAD.lst
drwxrwxr-x 2 james users              96 Oct 11 15:42 bin
-rw-r--r-- 1 james users            21 Oct 11 15:50 contacts.lst
drwxrwxr-x 2 james users              96 Oct 11 15:39 log
drwxrwxr-x 2 james users              96 Oct 11 15:39 run
drwxrwxrwx 2 james users               96 Oct 11 15:39 tmp

It looks similar to a crontab file. It is a simple space delimited file with the following format:
Step#, Success#, Fail#, Script
Where:
Step# is a unique integer from 1-? that identifies each step (note two different steps can launch
the same program if desired)
Success# is the Step# to execute on a success condition. The number 0 means do nothing, and
whatever the last step is in the stream this value is ignored.
Fail# is just like Success# except it is for Failures. Failures are also handled differently in that a 0
in its Failure# will result in notification being sent out, whether via the log or via email is your
choice.
And finally Script is the full path to the launcher that you want to run.

For SHDRAD it looks like this:
james@localhost:/opt/scripts/JobStream/SHDRAD> cat SHDRAD.lst
# Step 1 executes a wrapper for rc.startjob SHDRAD
1 2 0 /opt/scripts/JobStream/SHDRAD/bin/launchSHDRAD.sh
# If successful execute logfile cleanup
2 0 0 /opt/scripts/JobStream/SHDRAD/bin/cleanLog.sh

What this says is that the launchSHDRAD.sh script will launch as Step 1, if it succeds it then runs
cleanLog.sh, otherwise it will send notification of its failure (coming up). Since CleanLog.sh is the
last step the success and failure conditions do not matter. If you wanted to ignore cleanLog's
failures you could implement a dummy script that always exited with a good status and place it in
this file as CleanLog's failure step.

Step 5 (Set up Contacts - optional):
The contact list is nothing more than a list of email addresses. For SHDRAD I created the
following:
james@localhost:/opt/scripts/JobStream/SHDRAD> cat contacts.lst
gjames@celestica.com

By default jobStream.sh ignores comments (lines beginning with #). This also applies the the Job
list file as well. This allows you to comment out lines without having to delete them, in case you
need them in the future.

Step 6 (Schedule the JobStream in cron):
To accomplish this step and to keep your crontab file as clean as possible I recommend wrapping
the execution of jobStream.sh and its parameters.

        Part 1 (Create file):
        In order to do this I created a directory in james's home directory called JobStreams
        james@localhost:/export/home/testuser> mkdir JobStreams
Then I created the file.
        james@localhost:/export/home/testuser> vi JobStreams/shdrad.sh
        "JobStreams/shdrad.sh" [New file]
        #!/bin/sh
        SDIR=/opt/scripts/JobStream/SHDRAD;
        EXEC=/opt/scripts/JobStream/jobStream.sh;
        lfil="$SDIR/SHDRAD.lst";
        cfil="$SDIR/contact.lst";
        $EXEC -l $lfil -n $cfil -p $SDIR -N SHDRAD_Stream;

        I used variables in the command line to keep things clean on the screen.

        Part 2 (Modify Cron):
        james@localhost:/export/home/testuser> crontab -l > crontab
        james@localhost:/export/home/testuser> vi crontab
        "crontab" 3 lines, 148 characters
        * 20 * * * /opt/scripts/compressadmn.sh
        # to compress and overwrite the previous days maxi log.
        #* 1 * * * /opt/log/compress crontmp7
        #0 7 * * * /export/home/testuser/JobStreams/shdrad.sh
        james@localhost:/export/home/testuser> crontab crontab

        I always follow these steps to insure that I don't mess up the crontab file. You'll not that
my entry for shdrad.sh is
        commented out till we are ready to start using it.

Misc.
The script jobStream.sh resides in /opt/scripts/JobStream:
james@localhost:/export/home/testuser> cd /opt/scripts/JobStream
james@localhost:/opt/scripts/JobStream> ll
total 48
drwxr-xr-x 6 james users            1024 Oct 11 15:50 SHDRAD
-rw-r----- 1 james    users         4974 Oct 11 11:24 README
drwxr-xr-x 6 james       users        1024 Oct 11 11:40 StreamTest
-rwxr-x--- 1 james     users        16435 Oct 11 15:56 jobStream.sh

The README has some documentation in it as well.

Mais conteúdo relacionado

Mais procurados

Linux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptLinux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptKenny (netman)
 
Linux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls commandLinux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls commandbhatvijetha
 
Code tacoma command_line
Code tacoma command_lineCode tacoma command_line
Code tacoma command_lineAndrea Urban
 
Linux commands part3
Linux commands part3Linux commands part3
Linux commands part3bhatvijetha
 
3.1.c apend scripting, crond, atd
3.1.c apend   scripting, crond, atd3.1.c apend   scripting, crond, atd
3.1.c apend scripting, crond, atdAcácio Oliveira
 
A journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementA journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementLubomir Rintel
 
Linux commands part -2
Linux commands part -2Linux commands part -2
Linux commands part -2bhatvijetha
 
Basic command ppt
Basic command pptBasic command ppt
Basic command pptRohit Kumar
 

Mais procurados (13)

Linux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptLinux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell script
 
Prabu linux
Prabu linuxPrabu linux
Prabu linux
 
lec4.docx
lec4.docxlec4.docx
lec4.docx
 
Linux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls commandLinux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls command
 
Code tacoma command_line
Code tacoma command_lineCode tacoma command_line
Code tacoma command_line
 
Linux commands part3
Linux commands part3Linux commands part3
Linux commands part3
 
3.1.c apend scripting, crond, atd
3.1.c apend   scripting, crond, atd3.1.c apend   scripting, crond, atd
3.1.c apend scripting, crond, atd
 
A journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementA journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service management
 
Linux commands part -2
Linux commands part -2Linux commands part -2
Linux commands part -2
 
Samba 4 - debian instalacao
Samba 4 - debian instalacaoSamba 4 - debian instalacao
Samba 4 - debian instalacao
 
Vi Editor
Vi EditorVi Editor
Vi Editor
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 

Semelhante a Example Stream Setup

exercises-log-management-rsyslog.pdf
exercises-log-management-rsyslog.pdfexercises-log-management-rsyslog.pdf
exercises-log-management-rsyslog.pdfSngB2
 
DCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDocker, Inc.
 
55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines55 best linux tips, tricks and command lines
55 best linux tips, tricks and command linesArif Wahyudi
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool boxbpowell29a
 
202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricks202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricksdhorvath
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxkarlhennesey
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...Jim Birch
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbookWave Digitech
 
OverviewIn this assignment you will write your own shell i.docx
OverviewIn this assignment you will write your own shell i.docxOverviewIn this assignment you will write your own shell i.docx
OverviewIn this assignment you will write your own shell i.docxalfred4lewis58146
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-TranslatorDashamir Hoxha
 
DSpace Tutorial : Open Source Digital Library
DSpace Tutorial : Open Source Digital LibraryDSpace Tutorial : Open Source Digital Library
DSpace Tutorial : Open Source Digital Libraryrajivkumarmca
 

Semelhante a Example Stream Setup (20)

Linux Run Level
Linux Run LevelLinux Run Level
Linux Run Level
 
OS_lab_file.pdf
OS_lab_file.pdfOS_lab_file.pdf
OS_lab_file.pdf
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
exercises-log-management-rsyslog.pdf
exercises-log-management-rsyslog.pdfexercises-log-management-rsyslog.pdf
exercises-log-management-rsyslog.pdf
 
DCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker Captains
 
55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
 
202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricks202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricks
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 
OverviewIn this assignment you will write your own shell i.docx
OverviewIn this assignment you will write your own shell i.docxOverviewIn this assignment you will write your own shell i.docx
OverviewIn this assignment you will write your own shell i.docx
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
 
Dspace tutorial
Dspace tutorialDspace tutorial
Dspace tutorial
 
DSpace Tutorial : Open Source Digital Library
DSpace Tutorial : Open Source Digital LibraryDSpace Tutorial : Open Source Digital Library
DSpace Tutorial : Open Source Digital Library
 
HPC_MPI_CICID_OA.pptx
HPC_MPI_CICID_OA.pptxHPC_MPI_CICID_OA.pptx
HPC_MPI_CICID_OA.pptx
 
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
 
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
 
HPC_MPI_CICD.pptx
HPC_MPI_CICD.pptxHPC_MPI_CICD.pptx
HPC_MPI_CICD.pptx
 
50 Most Frequently Used UNIX Linux Commands -hmftj
50 Most Frequently Used UNIX  Linux Commands -hmftj50 Most Frequently Used UNIX  Linux Commands -hmftj
50 Most Frequently Used UNIX Linux Commands -hmftj
 

Mais de cfministries

Py Die R E A D M E
Py Die  R E A D M EPy Die  R E A D M E
Py Die R E A D M Ecfministries
 
Elemental Christianity
Elemental  ChristianityElemental  Christianity
Elemental Christianitycfministries
 
Peering Through The Mercy Seat
Peering Through The Mercy SeatPeering Through The Mercy Seat
Peering Through The Mercy Seatcfministries
 
Apostolic Private Eye
Apostolic  Private  EyeApostolic  Private  Eye
Apostolic Private Eyecfministries
 
Do You Make Jesus Sick
Do You Make  Jesus SickDo You Make  Jesus Sick
Do You Make Jesus Sickcfministries
 
Why Wait Get It Now
Why Wait    Get It NowWhy Wait    Get It Now
Why Wait Get It Nowcfministries
 
The Mind Of God ( Part 5)
The  Mind Of  God ( Part 5)The  Mind Of  God ( Part 5)
The Mind Of God ( Part 5)cfministries
 
The Mind Of God ( Part 4)
The  Mind Of  God ( Part 4)The  Mind Of  God ( Part 4)
The Mind Of God ( Part 4)cfministries
 
The Mind Of God ( Part 3)
The  Mind Of  God ( Part 3)The  Mind Of  God ( Part 3)
The Mind Of God ( Part 3)cfministries
 
The Mind Of God ( Part 2)
The  Mind Of  God ( Part 2)The  Mind Of  God ( Part 2)
The Mind Of God ( Part 2)cfministries
 
The Mind Of God ( Part 1)
The  Mind Of  God ( Part 1)The  Mind Of  God ( Part 1)
The Mind Of God ( Part 1)cfministries
 

Mais de cfministries (17)

Grade Statistics
Grade StatisticsGrade Statistics
Grade Statistics
 
R P G Generator
R P G  GeneratorR P G  Generator
R P G Generator
 
 
Py Die R E A D M E
Py Die  R E A D M EPy Die  R E A D M E
Py Die R E A D M E
 
Dealing W Spam
Dealing W SpamDealing W Spam
Dealing W Spam
 
Python Menu
Python MenuPython Menu
Python Menu
 
Elemental Christianity
Elemental  ChristianityElemental  Christianity
Elemental Christianity
 
Peering Through The Mercy Seat
Peering Through The Mercy SeatPeering Through The Mercy Seat
Peering Through The Mercy Seat
 
Apostolic Private Eye
Apostolic  Private  EyeApostolic  Private  Eye
Apostolic Private Eye
 
Do You Make Jesus Sick
Do You Make  Jesus SickDo You Make  Jesus Sick
Do You Make Jesus Sick
 
Why Wait Get It Now
Why Wait    Get It NowWhy Wait    Get It Now
Why Wait Get It Now
 
The Mind Of God ( Part 5)
The  Mind Of  God ( Part 5)The  Mind Of  God ( Part 5)
The Mind Of God ( Part 5)
 
The Mind Of God ( Part 4)
The  Mind Of  God ( Part 4)The  Mind Of  God ( Part 4)
The Mind Of God ( Part 4)
 
5 Questions
5  Questions5  Questions
5 Questions
 
The Mind Of God ( Part 3)
The  Mind Of  God ( Part 3)The  Mind Of  God ( Part 3)
The Mind Of God ( Part 3)
 
The Mind Of God ( Part 2)
The  Mind Of  God ( Part 2)The  Mind Of  God ( Part 2)
The Mind Of God ( Part 2)
 
The Mind Of God ( Part 1)
The  Mind Of  God ( Part 1)The  Mind Of  God ( Part 1)
The Mind Of God ( Part 1)
 

Example Stream Setup

  • 1. Step 1 (Create Stream Directory): I recommend this be kept in a central location for all your jobs. It will make recovery and trouble shooting much easier. For this Stream I created SHDRAD in /opt/scripts/JobStream Step 2 (Create Sub-Directories): bin = Where your launcher scripts are kept (required) log = Where stdout and stderr are redirected (jobStream.sh can create this on the fly if necessary) run = Where the lock file for jobStream.sh is stored during its run this prevents the same job from running multiple times if the first stream has not finished. tmp = Where stdout and stderr are redirected during the run then moved to log Only bin is requied to be created up front because you have to have a place to store your launcher scripts, the others can be created by jobStream.sh if necessary, but is recommended to create them up front to avoid failures. james@localhost:/opt/scripts/JobStream> cd SHDRAD james@localhost:/opt/scripts/JobStream/SHDRAD> ll total 4 -rw-r--r-- 1 james users 231 Oct 11 15:49 SHDRAD.lst drwxrwxr-x 2 james users 96 Oct 11 15:42 bin -rw-r--r-- 1 james users 21 Oct 11 15:50 contacts.lst drwxrwxr-x 2 james users 96 Oct 11 15:39 log drwxrwxr-x 2 james users 96 Oct 11 15:39 run drwxrwxrwx 2 james users 96 Oct 11 15:39 tmp Step 3 (Create the Launcher scripts): Launcher scripts can be simple commands or complex shell scripts. Here are the ones I created for SHDRAD. james@localhost:/opt/scripts/JobStream/SHDRAD> cd bin james@localhost:/opt/scripts/JobStream/SHDRAD/bin> ll total 4 -rwxrwx--- 1 james users 147 Oct 11 15:46 cleanLog.sh -rwxrwx--- 1 james users 64 Oct 11 15:41 launchSHDRAD.sh The obvious one is launchSHDRAD.sh, which launches the rc.startjob for executing the Baan job SHDRAD. james@localhost:/opt/scripts/JobStream/SHDRAD/bin> cat launchSHDRAD.sh #!/bin/sh BSE=/msl4/baan; /opt/etc/rc.startjob SHDRAD; exit $?; Since jobStream.sh stores all log files from all runs I created a simple cleanup program for SHDRAD, which will run if SHDRAD completes successfully, otherwise it will not run at all (I'll explain that in a bit). james@localhost:/opt/scripts/JobStream/SHDRAD/bin> cat cleanLog.sh #!/bin/sh MYLOG=/opt/script/JobStream/SHDRAD/log; cd $MYLOG; find . ( -f -ctime +30 ) -exec rm -f {} ; ERR=$?; cd -; exit $ERR;
  • 2. Step 4 (Create Job List): I created the job list for SHDRAD directly under the main directory for the stream. james@localhost:/opt/scripts/JobStream> cd SHDRAD james@localhost:/opt/scripts/JobStream/SHDRAD> ll total 4 -rw-r--r-- 1 james users 231 Oct 11 15:49 SHDRAD.lst drwxrwxr-x 2 james users 96 Oct 11 15:42 bin -rw-r--r-- 1 james users 21 Oct 11 15:50 contacts.lst drwxrwxr-x 2 james users 96 Oct 11 15:39 log drwxrwxr-x 2 james users 96 Oct 11 15:39 run drwxrwxrwx 2 james users 96 Oct 11 15:39 tmp It looks similar to a crontab file. It is a simple space delimited file with the following format: Step#, Success#, Fail#, Script Where: Step# is a unique integer from 1-? that identifies each step (note two different steps can launch the same program if desired) Success# is the Step# to execute on a success condition. The number 0 means do nothing, and whatever the last step is in the stream this value is ignored. Fail# is just like Success# except it is for Failures. Failures are also handled differently in that a 0 in its Failure# will result in notification being sent out, whether via the log or via email is your choice. And finally Script is the full path to the launcher that you want to run. For SHDRAD it looks like this: james@localhost:/opt/scripts/JobStream/SHDRAD> cat SHDRAD.lst # Step 1 executes a wrapper for rc.startjob SHDRAD 1 2 0 /opt/scripts/JobStream/SHDRAD/bin/launchSHDRAD.sh # If successful execute logfile cleanup 2 0 0 /opt/scripts/JobStream/SHDRAD/bin/cleanLog.sh What this says is that the launchSHDRAD.sh script will launch as Step 1, if it succeds it then runs cleanLog.sh, otherwise it will send notification of its failure (coming up). Since CleanLog.sh is the last step the success and failure conditions do not matter. If you wanted to ignore cleanLog's failures you could implement a dummy script that always exited with a good status and place it in this file as CleanLog's failure step. Step 5 (Set up Contacts - optional): The contact list is nothing more than a list of email addresses. For SHDRAD I created the following: james@localhost:/opt/scripts/JobStream/SHDRAD> cat contacts.lst gjames@celestica.com By default jobStream.sh ignores comments (lines beginning with #). This also applies the the Job list file as well. This allows you to comment out lines without having to delete them, in case you need them in the future. Step 6 (Schedule the JobStream in cron): To accomplish this step and to keep your crontab file as clean as possible I recommend wrapping the execution of jobStream.sh and its parameters. Part 1 (Create file): In order to do this I created a directory in james's home directory called JobStreams james@localhost:/export/home/testuser> mkdir JobStreams
  • 3. Then I created the file. james@localhost:/export/home/testuser> vi JobStreams/shdrad.sh "JobStreams/shdrad.sh" [New file] #!/bin/sh SDIR=/opt/scripts/JobStream/SHDRAD; EXEC=/opt/scripts/JobStream/jobStream.sh; lfil="$SDIR/SHDRAD.lst"; cfil="$SDIR/contact.lst"; $EXEC -l $lfil -n $cfil -p $SDIR -N SHDRAD_Stream; I used variables in the command line to keep things clean on the screen. Part 2 (Modify Cron): james@localhost:/export/home/testuser> crontab -l > crontab james@localhost:/export/home/testuser> vi crontab "crontab" 3 lines, 148 characters * 20 * * * /opt/scripts/compressadmn.sh # to compress and overwrite the previous days maxi log. #* 1 * * * /opt/log/compress crontmp7 #0 7 * * * /export/home/testuser/JobStreams/shdrad.sh james@localhost:/export/home/testuser> crontab crontab I always follow these steps to insure that I don't mess up the crontab file. You'll not that my entry for shdrad.sh is commented out till we are ready to start using it. Misc. The script jobStream.sh resides in /opt/scripts/JobStream: james@localhost:/export/home/testuser> cd /opt/scripts/JobStream james@localhost:/opt/scripts/JobStream> ll total 48 drwxr-xr-x 6 james users 1024 Oct 11 15:50 SHDRAD -rw-r----- 1 james users 4974 Oct 11 11:24 README drwxr-xr-x 6 james users 1024 Oct 11 11:40 StreamTest -rwxr-x--- 1 james users 16435 Oct 11 15:56 jobStream.sh The README has some documentation in it as well.