- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cron command fails many time.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010 09:48 AM
05-28-2010 09:48 AM
when i check the cron it runs evry 5 mins once, so now it stopped executing it.
when i check in cron log no clues there
> CMD: $HOME/bin/get_locks.sh WMPRD.WEBMDBPRDCOM.com > /dev/null
> oracle 20703 c Fri May 28 23:55:00 EST 2010
< oracle 20703 c Fri May 28 23:55:05 EST 2010
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010 10:01 AM
05-28-2010 10:01 AM
SolutionThe 'cron' daemon has no knowledge of any of the environmental variables you have after your login shells runs unless you explicitly source (read) your login profile or another file of variables.
Without seeing your actual script it is difficult to determine more. I suggest your read the 'crontab(1)' manpages for more insights.
Regards!
....JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010 10:29 AM
05-28-2010 10:29 AM
Re: cron command fails many time.
#!/bin/ksh
if [[ -z $1 ]]
then
echo "Argument required!"
echo "Usage: $0 DBservice_name"
echo "Example: $0 repos.aus.hp.world"
exit 1
fi
PATH=$PATH:.:/usr/local/bin:/usr/bin:/usr/ccs/bin:/opt/local/bin
today=`/bin/date +%d%m%y`
export ORACLE_SID=.
export ORAENV_ASK=NO
. oraenv
password=`/bin/cat $HOME/.hpmgmnt`
$ORACLE_HOME/bin/sqlplus -s <
hpmgmnt/`/bin/cat ~/.hpmgmnt`@$1
select to_char(sysdate,'DD/MM/YYYY HH24:MI:SS') from dual;
@$HOME/sql/locks.sql
exit
EOF
exit 0
james this is the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010 12:08 PM
05-28-2010 12:08 PM
Re: cron command fails many time.
0,5,10,15,20,25,30,35,40,45,50,55 * * * 1-5 $HOME/bin/get_locks.sh WMPRD.WEBMDBPRD.NATFOODS.COM.AU > /dev/null
this is the script, as in the day it mentioned as 1-5 so it will not run on saturday right?
date
Sat May 29 06:01:51 EST 2010
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010 01:18 PM
05-28-2010 01:18 PM
Re: cron command fails many time.
> this is the script, as in the day it mentioned as 1-5 so it will not run on saturday right?
Correct, weekday specifications are 0-6 with 0=Sunday. Hence, your script *will* run at 5-minute intervals at every hour on Monday through Friday; not Saturday or Sunday.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010 02:22 PM
05-28-2010 02:22 PM