Sponsored Content
Top Forums Shell Programming and Scripting Part of the Shell script is not running via crontab, runs fine manually Post 302710505 by gowthamakanthan on Thursday 4th of October 2012 01:56:02 PM
Old 10-04-2012
Hello Corona688,

I've tried whatever you suggested but no luck.

Code:
weblogic@[/SWIG/utilities]# date
Thu Oct  4 20:48:01 GMT+03:00 2012
weblogic@[/SWIG/utilities]# crontab -l
49 20 * * * /flexcube/user_projects/domains/WBFCSIM2/deployed_apps/SWIG/utilities/ATM_Restart_New.sh  2>/dev/null
weblogic@[/SWIG/utilities]# cat ATM_Restart_New.sh
#!/usr/bin/env ksh
. ~/.profile
# Use the following script to kill the currently running instance
# of the ATM scheduler, and restart the scheduler in nohup mode.
#Identify SWIG PID

PID=$(ps -ef |awk '/[S]WIG/ && !/ATM_Restart_New[.]sh/ { print $2 }');
#print "Original ATM process using PID=$PID"
# Kill the ATM
kill -9 $PID

sleep 30
echo $date

/usr/bin/nohup /flexcube/user_projects/domains/WBFCSIM2/deployed_apps/SWIG/utilities/run.sh 2>&1 > nohup.out &

weblogic@[/SWIG/utilities]# date
Thu Oct  4 20:53:22 GMT+03:00 2012
weblogic@[/SWIG/utilities]# ps -ef | grep SWIG
weblogic@[/SWIG/utilities]#

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script runs fine in Solaris, in Linux hangs at wait command

HI, I have a strange problem. A shell script that runs fine on solaris. when i ported to linux, it started hanging. here is the core of the script CFG_FILE=tab25.cfg sort -t "!" -k 2 ${CFG_FILE} | egrep -v "^#|^$" | while IFS="!" read a b c do #echo "jobs output" #jobs #echo "jobs... (13 Replies)
Discussion started by: aksaravanan
13 Replies

2. Shell Programming and Scripting

Getting issue while running it from cron while manually working fine

Hello, I am working one one script where I am using the below code which is using to connect with MKS client when I run my script manually it works effiecently i.e. it connects with MKS client but when I run it from CRON it doesn't connect. 1)Can some one tell when it is running from cron... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies

3. Shell Programming and Scripting

Script runs manually but not correctly from crontab

Hi all I have this inside a shell script (bash): cd DIRECTORY find . -maxdepth 1 | sed 's#./##' | /usr/bin/xargs -I '{}' chown -Rv '{}' /DIRECTORY/'{}' All the directories in this location are named after usernames, so it simply sets the owner to that of the username of the folder. It... (5 Replies)
Discussion started by: fakesy
5 Replies

4. Shell Programming and Scripting

Script runs manually but not correctly from crontab

Hello all, I'm new here and have a question if you don't mind helping me. I have a script that will work if I kick if off manually but not from Cron. My cron entry is this: 05,20,35,50 * * * * /scripts/status.sh > /dev/null 2>&1 The first script (works fine) is this: #!/bin/sh # #... (14 Replies)
Discussion started by: hs3082
14 Replies

5. Shell Programming and Scripting

Shell Script runs good manually but not through Cron tab

Hello Every one, I have a shell script which is running fine manually, but its giving me hard time when running tru cron job. :wall:. Am using #!/usr/bin/ksh >echo $SHELL /usr/bin/ksh Cron Job is as below, it execues but dosent do what i want it to do. 47 15 * * *... (1 Reply)
Discussion started by: naren.chowdhary
1 Replies

6. Shell Programming and Scripting

Script runs fine manually but not in crontab

Hello Guys, I have scratched my head alot on this but couldn't find clue what's wrong. Can you please help me with this? My problem is as following. 1) When I manually execute following script it runs successfully with below output. bash-3.00# more smssend #!/bin/bash echo -e "<Request... (16 Replies)
Discussion started by: umarsatti
16 Replies

7. Shell Programming and Scripting

Shell script not getting called through cron job but executes fine manually.

Hi, My shell script not getting called through cron job. The same works fine when executed manually. I tried to generate logs to find if the scripts has some errors related to path using following command- trying to execute .sh file every 5 mins: */5 * * * * /home/myfolder/abc.sh... (17 Replies)
Discussion started by: Dejavu20
17 Replies

8. Shell Programming and Scripting

Script runs good manually but failing via crontab

Hello Gurus, I have written small script which will start the given service if its stop .Its running fine when manually executed but its unable to run from crontab. #!/bin/bash SERVICENAME=rsyslog service $SERVICENAME status > /dev/null SYSLOGSTATUS=`echo $?` COUNT=0 THRESHOLD=3 if ... (4 Replies)
Discussion started by: kapil514
4 Replies

9. UNIX for Dummies Questions & Answers

Script runs manually but not from crontab in UNIX

Hi Guys, I am executing the script called Delet.sh manually it is successfully completing the task but it is failing to run vi cron tab, I tried to pass PATH & .profile before execution but no luck, Any suggestions? Script below #!/usr/bin/ksh #set -x # Purpose : Delete folders file from... (9 Replies)
Discussion started by: Anilsa77
9 Replies

10. Shell Programming and Scripting

Job runs manually, doesn't work in crontab

I have a script (/home/admin/run_bkup.sh) that I can run manually to kick off an executable job. I want to run it in crontab, but it doesn't work. Here's the script: shell=/bin/bash today=$(date +"%m-%d-%y") /opt/CPsuite-R77/fw1/bin/upgrade_tools/upgrade_export mgt-svr-bkup-$today << EOF y... (18 Replies)
Discussion started by: df08388
18 Replies
SWIG(1) 						      General Commands Manual							   SWIG(1)

NAME
swig - Simplified Wrapper and Interface Generator SYNOPSIS
swig [options] file DESCRIPTION
The swig command is used to create wrapper code to connect C and C++ code to scripting languages like Perl, Python, Tcl etc. from the defi- nition of the interface. For detailed information on writing those interface definitions please refer to /usr/share/doc/swig- doc-2.0.9/Doc/Manual/index.html from the swig-doc package. This manpage concentrates on explaining the invocation of the swig command. OPTIONS
Target Language Options: -allegrocl Generate ALLEGROCL wrappers -chicken Generate CHICKEN wrappers -clisp Generate CLISP wrappers -cffi Generate CFFI wrappers -csharp Generate C# wrappers -d Generate D wrappers -go Generate Go wrappers -guile Generate Guile wrappers -java Generate Java wrappers -lua Generate Lua wrappers -modula3 Generate Modula 3 wrappers -mzscheme Generate Mzscheme wrappers -ocaml Generate Ocaml wrappers -octave Generate Octave wrappers -perl Generate Perl wrappers -php Generate PHP wrappers -pike Generate Pike wrappers -python Generate Python wrappers -r Generate R (aka GNU S) wrappers -ruby Generate Ruby wrappers -sexp Generate Lisp S-Expressions wrappers -tcl Generate Tcl wrappers -uffi Generate Common Lisp / UFFI wrappers -xml Generate XML wrappers i General Options: -addextern Add extra extern declarations -c++ Enable C++ processing -co file Check file out of the SWIG library -copyctor Automatically generate copy constructors wherever possible -cpperraswarn Treat the preprocessor #error statement as #warning (default) -copyright Display copyright notices -debug-classes Display information about the classes found in the interface -debug-module n Display module parse tree at stages 1-4, n is a csv list of stages -debug-symtabs Display symbol tables information -debug-symbols Display target language symbols in the symbol tables -debug-csymbols Display C symbols in the symbol tables -debug-lsymbols Display target language layer symbols -debug-tags Display information about the tags found in the interface -debug-template Display information for debugging templates -debug-top n Display entire parse tree at stages 1-4, n is a csv list of stages -debug-typedef Display information about the types and typedefs in the interface -debug-typemap Display typemap debugging information -debug-tmsearch Display typemap search debugging information -debug-tmused Display typemaps used debugging information -directors Turn on director mode for all the classes, mainly for testing -dirprot Turn on wrapping of protected members for director classes (default) -Dsymbol Define a symbol symbol (for conditional compilation) -E Preprocess only, does not generate wrapper code -external-runtime [file] Export the SWIG runtime stack -fakeversion v Make SWIG fake the program version number to v -fcompact Compile in compact mode -features list Set global features, where list is a comma separated list of features, eg -features directors,autodoc=1 If no explicit value is given to the feature, a default of 1 is used -fastdispatch Enable fast dispatch mode to produce faster overload dispatcher code -Fmicrosoft Display error/warning messages in Microsoft format -Fstandard Display error/warning messages in commonly used format -fvirtual Compile in virtual elimination mode -help This output -I- Don't search the current directory -Idir Look for SWIG files in directory dir -ignoremissing Ignore missing include files -importall Follow all #include statements as imports -includeall Follow all #include statements -lifile Include SWIG library file ifile -macroerrors Report errors inside macros -makedefault Create default constructors/destructors (the default) -M List all dependencies -MD Is equivalent to '-M -MF file', except '-E' is not implied -MF file Generate dependencies into file and continue generating wrappers -MM List dependencies, but omit files in SWIG library -MMD Like '-MD', but omit files in SWIG library -module name Set module name to name -MP Generate phony targets for all dependencies -MT target Set the target of the rule emitted by dependency generation -nocontract Turn off contract checking -nocpperraswarn Do not treat the preprocessor #error statement as #warning -nodefault Do not generate default constructors nor default destructors -nodefaultctor Do not generate implicit default constructors -nodefaultdtor Do not generate implicit default destructors -nodirprot Do not wrap director protected members -noexcept Do not wrap exception specifiers -nofastdispatch Disable fast dispatch mode (default) -nopreprocess Skip the preprocessor step -notemplatereduce Disable reduction of the typedefs in templates -O Enable the optimization options: -fastdispatch -fvirtual -o outfile Set name of the output file to outfile -oh headfile Set name of the output header file to headfile -outcurrentdir Set default output dir to current dir instead of input file's path -outdir dir Set language specific files output directory to dir -pcreversion Display PCRE version information -small Compile in virtual elimination & compact mode -swiglib Report location of SWIG library and exit -templatereduce Reduce all the typedefs in templates -v Run in verbose mode -version Display SWIG version number -Wall Remove all warning suppression, also implies -Wextra -Wallkw Enable keyword warnings for all the supported languages -Werror Treat warnings as errors -Wextra Adds the following additional warnings: 202,309,403,512,321,322 -wlist Suppress/add warning messages, eg -w401,+321 see Warnings.html -xmlout file Write XML version of the parse tree to file after normal processing Tcl 8 Options (available with -tcl) -itcl Enable ITcl support -nosafe Leave out SafeInit module function. -prefix name Set a prefix name to be prepended to all names -namespace Build module into a Tcl 8 namespace -pkgversion Set package version Note: 'swig -lang -help' displays options for a specific target language. AUTHOR
SWIG was originally created by David Beazley. For up-to-date information about authors and contributors please check http://www.swig.org/guilty.html. This manual page was written by Torsten Landschoff <torsten@debian.org> and updated by Jitka Plesnikova <jplesnik@redhat.com> (but may be used by others). 2013-05-24 SWIG(1)
All times are GMT -4. The time now is 09:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy