Sponsored Content
Operating Systems Solaris Solaris 10.5 perl and cron job execution problem Post 302284423 by sonu2die4 on Thursday 5th of February 2009 12:50:10 PM
Old 02-05-2009
Solaris 10.5 perl and cron job execution problem

Hi,
I want to run a crontab job on solaris 10.5. I have configured the crontab accordingly
Code:
10 * * * * /scripts/dbalter.pl >> /scripts/cronout.txt

However this does not work .Then I go to /var/mail/root and find an error in the output:
Code:
From root@myserver Wed Feb  4 17:02:00 2009
Return-Path: <root@myserver>
Received: from myserver (localhost [127.0.0.1])
        by myserver (8.13.8+Sun/8.13.8) with ESMTP id n14N20Rx027373
        for <root@myserver>; Wed, 4 Feb 2009 17:02:00 -0600 (CST)
Received: (from root@localhost)
        by myserver (8.13.8+Sun/8.13.8/Submit) id n14N20Is027371
        for root; Wed, 4 Feb 2009 17:02:00 -0600 (CST)
Date: Wed, 4 Feb 2009 17:02:00 -0600 (CST)
From: Super-User <root@myserver>
Message-Id: <200902042302.n14N20Is027371@myserver>
To: root@myserver
Subject: Output from "cron" command
MIME-Version: 1.0
Content-Type: text/plain
Content-Length: 136

Your "cron" job on myserver
/usr/bin/perl/ /scripts/dbalter.pl

produced the following output:

sh: /usr/bin/perl/: cannot execute

bash-3.00£ env
LC_MONETARY=en_US.ISO8859-1
TERM=xterm
SHELL=/sbin/sh
SSH_CLIENT=138.85.45.27 28249 22
LC_NUMERIC=en_US.ISO8859-1
OLDPWD=/
SSH_TTY=/dev/pts/2
USER=root
PATH=/usr/sbin:/usr/bin
MAIL=/var/mail//root
LC_MESSAGES=C
LC_COLLATE=en_US.ISO8859-1
PWD=/var/adm
EDITOR=vi
TZ=US/Central
SHLVL=1
HOME=/
LOGNAME=root
SSH_CONNECTION=138.85.45.27 28249 10.25.30.190 22
LC_CTYPE=en_US.ISO8859-1
LC_TIME=en_US.ISO8859-1
_=/usr/bin/env

Also I want to mail the output to an outlook account. Please let me know about it. I really appreciate the help.

Regards
Sonu

Last edited by otheus; 02-10-2009 at 11:15 AM.. Reason: formatting and [code] tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sequential execution of job in cron

Hi I have a file say xyz.sh, whose contents are as follows : *************************** #! /bin/ksh set -x . /a.sh . /b.sh . /c.sh ***************************** Now will this execute all the three process simultaneously or sequentially? If it will process simultaneously, is... (3 Replies)
Discussion started by: pankajkrmishra
3 Replies

2. UNIX for Advanced & Expert Users

Cron job for Perl script

Although there are many threads on this forum regarding cron, none have specifically answered my question. So hopefully someone can shed some light on what I'm doing wrong.. I have a perl script that I want to run in a cron job. Since I've read that cron doesn't have any environments set, I... (3 Replies)
Discussion started by: man
3 Replies

3. UNIX for Dummies Questions & Answers

a cron job needs a perl script to execute

Hello evreyone, this is my first post, and to say i'm new to this is an understatement. I know very little about perl scripts and hope some one can help me. i'm looking to get a script that a cron job can execute. what the script needs to to is 1) connect to a mysql database 2) go to a... (2 Replies)
Discussion started by: Exader
2 Replies

4. Shell Programming and Scripting

SolarisCron job perl script execution error

Hi, I want to run a crontab job on solaris10.5. I have configured the crontab accordingly 10 * * * * /scripts/dbalter.pl >> /scripts/cronout.txt.However this does not work .Then I go to /var/mail/root and find an error in the output:... (4 Replies)
Discussion started by: sonu2die4
4 Replies

5. AIX

Execution Problem with Cron

Guys, I am beginer in unix. There is a cobol file with fixed-width. I want to read the total Line, Word and character count. I have tried with wc-l unix command, but it returns '0'. Please advice me the correct command/steps to get the record count. Thanks in advance. (4 Replies)
Discussion started by: vibhar
4 Replies

6. Shell Programming and Scripting

Problem with Job execution using crontab

Hi All, I am facing a problem with crontab.I made an entry in crontab like this 05 07 * * * /afs2/cdwfullacc/current/exe/cdw_generate_special_klant.sh > /afs2/cdwfullacc/current/scratch/cdw_gen_cron.log But job was not getting executed. Entry in crontab was made with same user by whom... (4 Replies)
Discussion started by: krishna_gnv
4 Replies

7. Shell Programming and Scripting

problem with sleep cmd in execution of cron...

I am scheduling a task at regular intervals at seconds acuracy using crond and sleep command . my data in crontab file is as below:- the above line is working fine when we are creating this crontab file before 00:05 min . But when we are creating the crontab file at 00:05min , unable to... (10 Replies)
Discussion started by: manoj424
10 Replies

8. UNIX for Dummies Questions & Answers

Execution problem with Cron: Script works manually but not w/Cron. Why?

Hello gurus, I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup is shown below: #!/bin/ksh db2... (3 Replies)
Discussion started by: okonita
3 Replies

9. Shell Programming and Scripting

Execution problem with CRON job

HI, I have written an executable file in unix and I was able to execute it successfully but when I called this file with cron job it was giving error like "permission denied" and "No such file or directory". Please help in how cron calls the file and what permission is required on the file... (2 Replies)
Discussion started by: vipin kumar rai
2 Replies

10. UNIX for Beginners Questions & Answers

Execution problem with Cron

Hi, I'm unable to understand why the grep command in cronjob works intermittently Expected output: Grep command to look for a particular string with today's date and exit from infinite while loop else it must sleep for 5 mins I'm using the following statement in my shell script, the... (9 Replies)
Discussion started by: charlie87
9 Replies
cron(8) 						      System Manager's Manual							   cron(8)

NAME
cron - The system clock daemon SYNOPSIS
/usr/sbin/cron DESCRIPTION
The cron daemon runs shell commands at specified dates and times. Commands that are to run according to a regular or periodic schedule are found within the crontab files. Commands that are to run once only are found within the at files. You submit crontab and at file entries by using the crontab and at commands. Because the cron process exits only when killed or when the system stops, only one cron daemon should exist on the system at any given time. Normally, you start the cron daemon from within a run command file. During process initialization and when cron detects a change, it examines the crontab and at files. This strategy reduces the overhead of checking for new or changed files at regularly scheduled intervals. The cron command creates a log of its activities. The cron daemon must be started from the system startup scripts because it must begin execution without a login user ID set. The cron daemon starts each job with the following process attributes stored with the job by the invoking process: Login user ID Effective and real user IDs Effective and real group IDs Supplementary groups It also establishes the following attributes from the authentication profile of the account associated with the login user ID of the invok- ing process: Audit control and disposition masks Kernel authorizations DIAGNOSTICS
The at and batch programs will refuse to accept jobs submitted from processes whose login user ID is different from the real user ID. FILES
Specifies the command path. Main cron directory Directory containing the crontab files. List of allowed users. List of denied users His- tory information for cron Queue description file for at, batch, and cron RELATED INFORMATION
Commands: at(1), crontab(1), rc0(8), rc2(8), rc3(8) Files: queuedefs(4) delim off cron(8)
All times are GMT -4. The time now is 09:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy