Sponsored Content
Full Discussion: cron job error
Top Forums Shell Programming and Scripting cron job error Post 302325268 by aemunathan on Sunday 14th of June 2009 07:10:56 AM
Old 06-14-2009
cron job error

HI

am having a script file which is ok if i run from the server manually
like
Code:
<root@hostname:/space/canvas/home/lbs/current/internalcdrbackup/LES_CDR_Configuration/0/MSISDNcdrCount > /space/canvas/home/lbs/current/internalcdrbackup/LES_CDR_Configuration/0/MSISDNcdrCount.txt

the MSISDNcdrcount file contains:
Code:
#!/bin/ksh

dat=$(/space/canvas/home/lbs/current/internalcdrbackup/LES_CDR_Configuration/0/datecalc -a $(date +"%Y %m %d") - 1)

b=`TZ=CST+24 date +%d-%b-%Y`

host=$(hostname)

day=$(/usr/xpg4/bin/awk -v d="$dat" 'BEGIN {split(d,a," ");day=sprintf("%s%02s%02s",a[1],a[2],a[3]);print day}')
/usr/xpg4/bin/awk -v d="$day" -v serv="BSNLSERVICE1" -v val="2128" -v da="$b" -v ho="$host" '
$1~day && $4==serv && $6==val {
  b[$9]++
}
END{
  for (i in b )
  { print da, i, b[i],ho }
}' $day*

the cron entry is as below:
Code:
05 15 * * * /space/canvas/home/lbs/current/internalcdrbackup/LES_CDR_Configuration/0/MSISDNcdrCount > /space/canvas/home/lbs/current
/internalcdrbackup/LES_CDR_Configuration/0/MSISDNcdrCount.txt

but once the schedule comes the cron produces the output as follows
Quote:
Your "cron" job on lessrv1
/space/canvas/home/lbs/current/internalcdrbackup/LES_CDR_Configuration/0/MSISDNcdrCount > /space/canvas/home/lbs/current/internalcdrbackup/LES_CDR_Configuration/0/MSISDNcdrCount.txt

produced the following output:

input file "20090613*"
what could be issue...?
 

10 More Discussions You Might Find Interesting

1. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

2. Shell Programming and Scripting

Cron job giving error while running SSH command

Hi All, The script which i am using to SSH to remote server is working fine when i run is using ./ but when cron runs it it gives error that "ssh: not found" please help!!! (3 Replies)
Discussion started by: visingha
3 Replies

3. UNIX for Dummies Questions & Answers

Error in cron job;

Hi All, please help me out with this problem. While running my mail_out_original.ksh in CRT window, it disconnects from the server saying not connected Here is my code : (please see the attachment) ____________________________________________________________ #!/bin/ksh ## Load... (1 Reply)
Discussion started by: shruthinagaraj
1 Replies

4. Shell Programming and Scripting

Error in cron job;

Hi All, please help me out with this problem. While running my mail_out_original.ksh in CRT window, it disconnects from the server saying not connected Here is my code : (please see the attachment) ____________________________________________________________ #!/bin/ksh ## Load... (1 Reply)
Discussion started by: shruthinagaraj
1 Replies

5. Solaris

Shell Script gives error when run through cron job.

Hi, The following shell script runs without any problem when executed manulally. USED=$(df -h /arch | tail -1 | awk '{print $5}' | cut -d '%' -f 1) if then find /arch/AUBUAT/ -type f -mtime +0 | xargs rm find /arch/AUBMIG/ -type f -mtime +0 | xargs rm fi But the same gives below... (6 Replies)
Discussion started by: ksadiq79
6 Replies

6. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

7. Shell Programming and Scripting

Cron job fails with [DataDirect][ODBC lib] Connection not open error

Hi, When run the script directly...it executes as expected. But when put it in crontab the job fails with this error: Connection not open 08003: Connection not open Unable to connect to the database... how come it is not able to connect when cron job fires?... Do I need to... (7 Replies)
Discussion started by: nuthakki
7 Replies

8. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

9. UNIX for Dummies Questions & Answers

Error while running a script through cron job

Hi Team, When i am running the below query manually it is giving me the right output i.e. export PATH=/usr/sbin:/usr/bin:/sbin:/bin:$PATH ADMIN=abc@abc.com CPU_HIGH=`sar|awk '{print $9}'|sort -n|head -5|sed -n 5p` CPU_MAX=`echo "scale=3; 100-$CPU_HIGH" | bc` CPU_LOW=`sar|awk '{print... (13 Replies)
Discussion started by: Ekamjot
13 Replies

10. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies
Tk_CanvasPs(3)						       Tk Library Procedures						    Tk_CanvasPs(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_CanvasPsY, Tk_CanvasPsBitmap, Tk_CanvasPsColor, Tk_CanvasPsFont, Tk_CanvasPsPath, Tk_CanvasPsStipple - utility procedures for generating Postscript for canvases SYNOPSIS
#include <tk.h> double Tk_CanvasPsY(canvas, canvasY) int Tk_CanvasPsBitmap(interp, canvas, bitmap, x, y, width, height) int Tk_CanvasPsColor(interp, canvas, colorPtr) int Tk_CanvasPsFont(interp, canvas, tkFont) Tk_CanvasPsPath(interp, canvas, coordPtr, numPoints) int Tk_CanvasPsStipple(interp, canvas, bitmap) ARGUMENTS
Tk_Canvas canvas (in) A token that identifies a canvas widget for which Postscript is being generated. double canvasY (in) Y-coordinate in the space of the canvas. Tcl_Interp *interp (in/out) A Tcl interpreter; Postscript is appended to its result, or the result may be replaced with an error message. Pixmap bitmap (in) Bitmap to use for generating Postscript. int x (in) X-coordinate within bitmap of left edge of region to output. int y (in) Y-coordinate within bitmap of top edge of region to output. int width (in) Width of region of bitmap to output, in pixels. int height (in) Height of region of bitmap to output, in pixels. XColor *colorPtr (in) Information about color value to set in Postscript. Tk_Font tkFont (in) Font for which Postscript is to be generated. double *coordPtr (in) Pointer to an array of coordinates for one or more points specified in canvas coordinates. The order of values in coordPtr is x1, y1, x2, y2, x3, y3, and so on. int numPoints (in) Number of points at coordPtr. _________________________________________________________________ DESCRIPTION
These procedures are called by canvas type managers to carry out common functions related to generating Postscript. Most of the procedures take a canvas argument, which refers to a canvas widget for which Postscript is being generated. Tk_CanvasPsY takes as argument a y-coordinate in the space of a canvas and returns the value that should be used for that point in the Postscript currently being generated for canvas. Y coordinates require transformation because Postscript uses an origin at the lower-left corner whereas X uses an origin at the upper-left corner. Canvas x coordinates can be used directly in Postscript without transformation. Tk_CanvasPsBitmap generates Postscript to describe a region of a bitmap. The Postscript is generated in proper image data format for Post- script, i.e., as data between angle brackets, one bit per pixel. The Postscript is appended to interp->result and TCL_OK is returned unless an error occurs, in which case TCL_ERROR is returned and interp->result is overwritten with an error message. Tk_CanvasPsColor generates Postscript to set the current color to correspond to its colorPtr argument, taking into account any color map specified in the postscript command. It appends the Postscript to interp->result and returns TCL_OK unless an error occurs, in which case TCL_ERROR is returned and interp->result is overwritten with an error message. Tk_CanvasPsFont generates Postscript that sets the current font to match tkFont as closely as possible. Tk_CanvasPsFont takes into account any font map specified in the postscript command, and it does the best it can at mapping X fonts to Postscript fonts. It appends the Post- script to interp->result and returns TCL_OK unless an error occurs, in which case TCL_ERROR is returned and interp->result is overwritten with an error message. Tk_CanvasPsPath generates Postscript to set the current path to the set of points given by coordPtr and numPoints. It appends the result- ing Postscript to interp->result. Tk_CanvasPsStipple generates Postscript that will fill the current path in stippled fashion. It uses bitmap as the stipple pattern and the current Postscript color; ones in the stipple bitmap are drawn in the current color, and zeroes are not drawn at all. The Postscript is appended to interp->result and TCL_OK is returned, unless an error occurs, in which case TCL_ERROR is returned and interp->result is over- written with an error message. KEYWORDS
bitmap, canvas, color, font, path, Postscript, stipple Tk 4.0 Tk_CanvasPs(3)
All times are GMT -4. The time now is 09:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy