Sponsored Content
Top Forums Shell Programming and Scripting cron job is not working for two scripts Post 302517564 by sanjay.login on Wednesday 27th of April 2011 06:45:37 AM
Old 04-27-2011
hi gurus,

I would like to give more details about the problem how the cronjob is not running.

priviously the cronjob entry was like below

Code:
. /dir1/dir2/cron_test.env;/dir1/dir2/transfer_file_to_target_updatedone.pl

actually in the second file which is perl file the initial lines looked like

Code:
 
#!/opt/perl/bin/perl -I/opt/perl/lib/site_perl -I/opt/perl/lib
use strict;
use Net::SFTP;
use Net::SFTP::Util qw (fx2txt);
use Net::FTP;
use Data::Dumper;
use DBD::Oracle qw(:ora_types);
use MIME::Lite;

But now though we are using the scp to include in the perl file
we are include one module in the perl file (in sence ,we have added a line" use Net::SCP::Expect;"like below) and the current initial lines looks like

Code:
#!/opt/perl/bin/perl -I/opt/perl/lib/site_perl -I/opt/perl/lib
use strict;
use Net::SFTP;
use Net::SFTP::Util qw (fx2txt);
use Net::FTP;
use Net::SCP::Expect; 
use Data::Dumper;
use DBD::Oracle qw(:ora_types);
use MIME::Lite;

and inside the pl we are using scp for secure copy.

now I think i got the problem due to this additional module which we added in the perl script that is making the cron job not running (but first .env script is working in both of cases"as it before and now").

I think some where cron is mainting these modules for "scp"(which should be added in cron list).

I have tried a lot it is not working(as a developer i am not accesed to open cron log) after implemented the "use Net::SCP::Expect; " (think should be added somewhere in cron list which should be done by unix admin).



Waiting for your reply

Sanjay.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cron job not working

Hi All, I created a shell script and it works perfectly fine when I run from the command. But the same does not work as expected when I call it from a cron job. Here is the shell script(scan.sh): # # #Which directory to scan for files?... (7 Replies)
Discussion started by: janavenki
7 Replies

2. UNIX for Dummies Questions & Answers

CRON job to execute all scripts in a directory

Hi everyone: I'm trying to make a CRON job that will execute Fridays at 7am. I have the following: * 7 * * 5 I've been studying up on CRON and I know to have this in a file and then "crontab filename.txt" to add it to the CRON job list. The CRON part I believe I understand, but I would... (6 Replies)
Discussion started by: Annorax
6 Replies

3. UNIX for Dummies Questions & Answers

Cron job not working

Hello, I have the following crontab entry that does not seem to be running. When I check /var/cron/log, it is not there. Here is my os info: SunOS birch 5.9 Generic_118558-09 sun4u sparc SUNW,Sun-Fire-V240 Here is the crontab entry: 01 21 * * * find /export/app/datafeed/flus/archive -mtime... (5 Replies)
Discussion started by: dkranes
5 Replies

4. Shell Programming and Scripting

cron job not working for some reasons

I set up a new cron job. I have set cron jobs many times in the past and never faced issues. For some reasons my new cron job is not working.This is how my cron job looks like. plz help me out guys. 3,8,13,18,23,28,33,38,43,48,53,58 * * * * /siebel/sblp900/home/FSMTaskChk/script... (14 Replies)
Discussion started by: ragha81
14 Replies

5. Shell Programming and Scripting

Sudo command not working with cron job.

Hello, I have written a script that has a sudo command to change file permissions within it. When I run the script manually, the sudo command inside of it works fine. When the script is run through crontab I get the error "cron: not found". It the same user profile that I am using... (6 Replies)
Discussion started by: WhotheWhat
6 Replies

6. Shell Programming and Scripting

Linux - scripts not working in cron

hi all, i have scripts executable in manully, but not working in cron. any ideas? thanks a lot? * * * * * /home/dir/dir/file.sh #! /bin/sh alarmPath="/home/dir/monitoringAlarm" alarmDateTime="$(date +%Y%m%d) $(date +%H%M%S)" tomcatPID=`pidof /usr/local/jdk1.6.0_13/bin/java` echo "tomcat... (3 Replies)
Discussion started by: maxlee24
3 Replies

7. Shell Programming and Scripting

cron job now working?

Hi all, I wrote a script as below, #!/bin/ksh . /app/home/etc/sudo.profile >/dev/null java -jar $HOME/abc.jar The jar file abc.jar is located in the same folder as the script. When I'm manually running that script the jar file gets executed. However if I set a cron job, it... (5 Replies)
Discussion started by: isaacniu
5 Replies

8. UNIX for Dummies Questions & Answers

Executing python scripts via cron job

Hi, I'm executing a python script via cron job. The way it is set up is, I'm editing a file called local00 22 * * * root su - -c "/opt/setup_dir/bin/run_bkp -p" When this job executes, the command-specific logfile and the syslog (where the logs are supposed to go) show half of the logs(no... (2 Replies)
Discussion started by: ashwini.engr07
2 Replies

9. UNIX for Dummies Questions & Answers

Cron job not working

cron process in AIX is there when I do ps -ef |grep cron, but none of cron job is working. It appears that cron process is hanging or having some issues? How do you resolve this? Do I kill the cron process by kill -9 PID? and how to start it? Please advise. (1 Reply)
Discussion started by: Daniel Gate
1 Replies

10. AIX

Cron job not working but works on other nodes.

Hi All, I have a many cron jobs scheduled in my AIX server. Only one cron not getting executed in the same server but that job is good on all other servers. Here is my cron , which will keep last 30 files and remove others., 00 00 * * * /usr/bin/find /tmp/reports/nmon -name *.nmon -mtime... (9 Replies)
Discussion started by: Thala
9 Replies
Net::LDAP::Control::SyncState(3)			User Contributed Perl Documentation			  Net::LDAP::Control::SyncState(3)

NAME
Net::LDAP::Control::SyncState - LDAPv3 Sync State control object SYNOPSIS
See Net::LDAP::Control::SyncRequest DESCRIPTION
"Net::LDAP::Control::SyncState" provides an interface for the creation and manipulation of objects that represent the "Sync State Control" as described by RFC 4533. CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in Net::LDAP::Control the following are provided. state entryUUID cookie METHODS
As with Net::LDAP::Control each constructor argument described above is also available as a method on the object which will return the current value for the attribute if called without an argument, and set a new value for the attribute if called with an argument. SEE ALSO
Net::LDAP, Net::LDAP::Control, Net::LDAP::Control::SyncRequest, Net::LDAP::Control::SyncDone, http://www.ietf.org/rfc/rfc4533.txt AUTHOR
Mathieu Parent <math.parent@gmail.com> Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org> COPYRIGHT
Copyright (c) 2008 Mathieu Parent. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-07-21 Net::LDAP::Control::SyncState(3)
All times are GMT -4. The time now is 09:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy