Sponsored Content
Top Forums Shell Programming and Scripting Script runs manually, but not from cron Post 302974276 by bredman on Friday 27th of May 2016 06:59:41 AM
Old 05-27-2016
Script runs manually, but not from cron

Hi,

I "borrowed" a script I found online, to start a SAP router application on a Solaris 11 (SPARC) server.

The script runs fine when calling it manually, but when I schedule it to run from cron, it doesn't. I don't see any warning or failure messages anywhere, just nothing happens.

Here is the relevant part of the script;

Code:
 # Set Variables
ROUTDIR="/usr/sap/saprouter";
DNAME="p:CN=SERVERNAME, OU=0000xxxxxx, OU=SERVERNAME, O=SAP, C=DE";
# End Variables
#
/usr/sap/saprouter/./saprouter -r -R "$ROUTDIR/saprouttab" -K "$DNAME" &
exit

Here is the cron entry;

Code:
 00 10 * * 1-5 /usr/sap/saprouter/scriptname

Any ideas?

Thanks in advance.



Moderator's Comments:
Mod Comment Please use code tags as required by forum rules!


Bryan

Last edited by RudiC; 05-27-2016 at 08:08 AM.. Reason: Added code tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can run script Manually, but not through Cron?

Hi all, I have a main script (called OracleCleanup) that runs some sql queries. that runs off a wrapper script which contains the sources for the login information and and JOB_HOME (the script is below). When I schedule this job in the cron the log says that it cannot open my list file, which... (4 Replies)
Discussion started by: MadHatter
4 Replies

2. Solaris

SFTP errorcode 1 when run on cron but runs manually

I am trying to run a sript on cron to SFTP data to a company. Private and public keys are set up. When I run this manully it works fine, however it was failing when run on cron. I have narrowed down the problem - it fails at the code that says if the error code is 0 then continue . . . I... (2 Replies)
Discussion started by: Heidi.Ebbs
2 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

Part of the Shell script is not running via crontab, runs fine manually

Hello Team, As a part of my job we have made a script to automate a service to restart frequently. Script having two functions when executing it's should find the existing service and kill it, then start the same service . Verified the script it's working fine when executing... (18 Replies)
Discussion started by: gowthamakanthan
18 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. UNIX for Dummies Questions & Answers

Execution problem with Cron: Script works manually but not w/Cron. Why?

Hello gurus, I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup is shown below: #!/bin/ksh db2... (3 Replies)
Discussion started by: okonita
3 Replies
llc2_loop(1M)						  System Administration Commands					     llc2_loop(1M)

NAME
llc2_loop - loopback diagnostics to test the driver, adapter and network. SYNOPSIS
/usr/lib/llc2/llc2_loop2 [-v] ppa /usr/lib/llc2/llc2_loop3 ppa sap frames /usr/lib/llc2/llc2_loop3 ppa type frames /usr/lib/llc2/llc2_loop4 [-v] ppa DESCRIPTION
Loop 2 The loop2 test sends a NULL XID frame to the broadcast (all 1's) destination MAC address. The source SAP (Service Access Point) value used is 0x04 (SNA's SAP). Therefore, if SNA is running on the system, the loop2 test will fail. The destination SAP value is the NULL SAP(0x00). This test finds out who is listening and can receive frames sent out from a node. The verbose (-v) option displays the MAC address of responding nodes. All possible responders may not be displayed, since the loop2 test only waits for responses for 2 seconds, but during this time 50-200 nodes may be displayed. The most likely error is: Unexpected DLPI primitive x, expected y. where x = 5 and y = 6. From /usr/include/sys/dlpi.h, the expected return value from one of the DLPI primitives is 6 (DL_OK_ACK), but instead a 5 (DL_ERROR_ACK) was received. This can occur for two reasons: o The loop2 command was issued to a non-existent PPA (Physical Point of Attachment). o The SAP(0x04) is already in use (for example, the SNA subsystem is up). Loop 3 The loop3 test sends 1,495 byte Unnumbered Information (UI) frames to the NULL (all 0's) destination MAC address. This should be used along with data capture either on the local node or another node on the same LAN to verify the transmission of data. The ppa argument spec- ifies the adapter on which to run the test. The ppa is the relative physical position of the adapter and may be ascertained by viewing the adapter configuration (see llc2_config(1)). For Token Ring or Ethernet, specify an even sap value from 2 through 254, or, for Ethernet only, any type value from 1519(0x05ef) through 65535(0xffff). It is advised to pick a value that is easily recognized when the data cap- ture output is viewed. frames is the decimal number of 1,495 bytes packets to transmit. The test will only display a message if a failure occurs. Loop 4 The loop4 test sends a TEST frame (no information field) to the broadcast (all 1's) destination MAC address. The source SAP value used is 0x04 (SNA's SAP). Therefore, if SNA is running on the system, the loop4 test will fail. The destination SAP value is the NULL SAP(0x00). This test finds out who is listening and can receive frames sent out from a node. The verbose (-v) option displays the MAC address of responding nodes. All possible responders may not be displayed since the loop4 test only waits for responses for 2 seconds, but during this time 50-200 nodes may be displayed. The loop4 test displays information similar to the following example if other nodes are listening and respond (verbose mode): -Attaching -Binding -Sending TEST -Responders 1-0000c0c12449 2-08000e142990 3-08000e142a51 4-0000c0450044 5-0000c0199e46 -Unbinding -Detaching 5 nodes responding The errors displayed are the same as for loop2. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWllc | +-----------------------------+-----------------------------+ SEE ALSO
llc2_config(1), llc2(4), attributes(5), llc2(7D) NOTES
For information about how to start the service, see llc2(7D) SunOS 5.10 18 May 1999 llc2_loop(1M)
All times are GMT -4. The time now is 12:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy