The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SolarisCron job perl script execution error sonu2die4 Shell Programming and Scripting 4 02-06-2009 05:22 PM
Cron execution of shell script ashish.sharma Shell Programming and Scripting 3 09-08-2008 03:57 AM
cron execution rameek20 SUN Solaris 6 10-22-2007 06:30 AM
Sequential execution of job in cron pankajkrmishra Shell Programming and Scripting 3 08-15-2006 06:19 AM
Cron Skips Execution nag_sundaram HP-UX 6 10-25-2005 03:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-05-2009
sonu2die4 sonu2die4 is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 11
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
  #2 (permalink)  
Old 02-10-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,889
The first line of your script should look like

Code:
#!/usr/bin/perl

and NOT like

Code:
#!/usr/bin/perl/

Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:35 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0