LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 10-21-2009, 11:05 AM   #1
mustafa12
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
problem with cronjob and system commnd


Dear All,

Need your help with respect to the cronjob setup in Solaris and Undo checkout operation in Clearcase using perl script.
I have a cronjob and it is working fine, but problem is, system command in perl script is not working as per requirement.
Please find the snipped, of code as below for your kind reference.

Checkout_Reminder.pl :

if($Difference > 15 )
{
&send_mail($Xid_Value, $View_Name, $File_2_Uncheckout, $Difference, $Vobs ); # this sends the mail, and everyting works fine.
system ("/usr/atria/bin/cleartool unco -keep $File_2_Uncheckout"); # $File_2_Uncheckout is the complete path for the file to be undo check out.
}

If the $Difference value is greater than 15, it sends the mail to user. But the second line
system command is not working as per the behavior, due to which undo check out operation is not performed.

And the cronjob setup is as below.

25 12 * * * /usr/atria/bin/cleartool setview -exec /vobs/vobs_verif/tools/DB_cronjobs/Checkout_Reminder.pl view_MAIN

I am getting the message as below in cronjob output.

Your "cron" job on serting
/usr/atria/bin/cleartool setview -exec /vobs/vobs_verif/tools/DB_cronjobs/Checkout_Reminder.pl view_MAIN

produced the following output:

cleartool: Error: Element name not found: "/view/view_LDPACE6R05/vobs/vobs_verif/devices/LDPACE6R05/M3/SYS1/module/module.h".


Your will be appreciated.

Regards,
Mustafa
 
Old 10-22-2009, 05:44 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
The paths look good; perhaps something else in the environment is causing the problem. You could see if this is the case by using a shell script wrapper to simulate the login process. The -l on #! /bin/bash -l is a letter l not a number 1:
Code:
#! /bin/bash -l
<full path to>/Checkout_Reminder.pl
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cronjob problem manoj.linux Linux - Enterprise 7 03-17-2008 11:52 AM
smtp client need STARTTLS commnd. jlkuo56linuxqu Programming 3 07-20-2006 03:50 AM
Problem with cronjob Arndt Linux - Newbie 1 04-05-2005 05:40 AM
cronjob problem chadi Linux - General 5 10-10-2004 09:09 PM
cronjob problem ashley75 Linux - General 2 05-28-2004 05:47 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration