- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron job problem
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
01-21-2010 04:06 AM
01-21-2010 04:06 AM
The script redirects the o/p to a file and compares it with another file.It returns all ok if there are no difference else returns the difference.
When i run this in CLI as root its all ok but in cronjob it gives differences.Please advice
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2010 04:17 AM
01-21-2010 04:17 AM
Re: Cron job problem
Post your crontab entry.
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2010 04:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2010 05:27 AM
01-21-2010 05:27 AM
Re: Cron job problem
KSCHD=/home/151001/sched-frm.txt
LOG=/home/151001/schd-chk.log
/opt/UniQ/Batch/programs/commands/liq -Owner batch -No_Prompt|grep -i stream01|grep -i new|awk '{print $3}' > $SCHD
diff $SCHD $KSCHD
RC=$?
if [ RC -eq 0 ]
then
echo "\nSchedules ok \n" >> $LOG
else
echo "\nCheck the following jobs in schedules\n" >> $MLOG
diff $SCHD $KSCHD >> $MLOG
fi
mailx -s "Checks-Schedule" 151001 <$LOG
rm $LOG
exit 0
When the script is executed by cronjob the file $SCHD is empty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2010 06:02 AM
01-21-2010 06:02 AM