The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: cron job
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-13-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 2,923
The simplest way is to have the cron job itself signal to you somehow, perhaps by creating a file when starting and removing it when done. What's tougher is if there needs to be some mechanism to figure out whether it's really only just working and taking time, or hanging. Perhaps your best bet is to make it verbose enough that you can tell when it's not working simply by observing the lack of output.

Your second question seems to be about redirection; yes, you can redirect standard output using 1> and standard error using 2> like this:

Code:
runjob 1>output 2>errors
(The "1" is implicit in the first redirection, and often left out.)
Reply With Quote