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::INET6Glue(3pm)					User Contributed Perl Documentation				       Net::INET6Glue(3pm)

NAME
Net::INET6Glue - Make common modules IPv6 ready by hotpatching SYNOPSIS
use Net::INET6Glue; # include all glue use LWP; use Net::SMTP; use Net::FTP; .. DESCRIPTION
Net::INET6Glue is a collection of modules to make common modules IPv6 ready by hotpatching them. Unfortunatly the current state of IPv6 support in perl is that no IPv6 support is in the core and that a lot of important modules (like Net::FTP, Net::SMTP, LWP,...) do not support IPv6 even if the modules for IPv6 sockets Socket6, IO::Socket::INET6 are available. This module tries to mitigate this by hotpatching. Currently the following submodules are available: Net::INET6Glue::INET_is_INET6 Makes IO::Socket::INET behave like IO::Socket::INET6, especially make it capable to create IPv6 sockets. This makes LWP, Net::SMTP and others IPv6 capable. Net::INET6Glue::FTP Hotpatches Net::FTP to support EPRT and EPSV commands which are needed to deal with FTP over IPv6. Also loads Net::INET6Glue::INET_is_INET6. COPYRIGHT
This module and the modules in the Net::INET6Glue Hierarchy distributed together with this module are copyright (c) 2008, Steffen Ullrich. All Rights Reserved. These modules are free software. They may be used, redistributed and/or modified under the same terms as Perl itself. perl v5.12.3 2011-08-27 Net::INET6Glue(3pm)
All times are GMT -4. The time now is 12:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy