HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: problem with shell-script and cron
Operating System - HP-UX
1833875
Members
2915
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-19-2002 01:18 AM
05-19-2002 01:18 AM
I recently tried to schedule a shell-script(Script see attachment) using cron to run each day at 8am, but the only thing it produces are the following errors(for explaination the script uses a C-Programm called oliver to calculate a Timespan):
/home/oliver/reportomni.sh[47]: omnidb: not found.
/home/oliver/reportomni.sh[3]: omnidb: not found.
/home/oliver/reportomni.sh[10]: omnidb: not found.
/home/oliver/reportomni.sh[12]: omnidb: not found.
/home/oliver/reportomni.sh[13]: omnidb: not found.
arg1 Getdate(3C) exit code 7: There is no line in the template that matches the input
/home/oliver/reportomni.sh[50]: omnidb: not found.
/home/oliver/reportomni.sh[3]: omnidb: not found.
/home/oliver/reportomni.sh[10]: omnidb: not found.
/home/oliver/reportomni.sh[12]: omnidb: not found.
/home/oliver/reportomni.sh[13]: omnidb: not found.
arg1 Getdate(3C) exit code 7: There is no line in the template that matches the input
/home/oliver/reportomni.sh[53]: omnidb: not found.
/home/oliver/reportomni.sh[3]: omnidb: not found.
/home/oliver/reportomni.sh[10]: omnidb: not found.
/home/oliver/reportomni.sh[12]: omnidb: not found.
/home/oliver/reportomni.sh[13]: omnidb: not found.
arg1 Getdate(3C) exit code 7: There is no line in the template that matches the input
*************************************************
Cron: The previous message is the standard output
and standard error of one of your crontab commands:
/home/oliver/reportomni.sh >/home/oliver/reportomni.log
It also doesnt write the log as it is supposed to. The Entries in the crontab are:
50 7 * * * /home/oliver/movelogs.sh >>/home/oliver/reportomni.log
0 8 * * * /home/oliver/reportomni.sh >>/home/oliver/reportomni.log
Can Anybody help me.
/home/oliver/reportomni.sh[47]: omnidb: not found.
/home/oliver/reportomni.sh[3]: omnidb: not found.
/home/oliver/reportomni.sh[10]: omnidb: not found.
/home/oliver/reportomni.sh[12]: omnidb: not found.
/home/oliver/reportomni.sh[13]: omnidb: not found.
arg1 Getdate(3C) exit code 7: There is no line in the template that matches the input
/home/oliver/reportomni.sh[50]: omnidb: not found.
/home/oliver/reportomni.sh[3]: omnidb: not found.
/home/oliver/reportomni.sh[10]: omnidb: not found.
/home/oliver/reportomni.sh[12]: omnidb: not found.
/home/oliver/reportomni.sh[13]: omnidb: not found.
arg1 Getdate(3C) exit code 7: There is no line in the template that matches the input
/home/oliver/reportomni.sh[53]: omnidb: not found.
/home/oliver/reportomni.sh[3]: omnidb: not found.
/home/oliver/reportomni.sh[10]: omnidb: not found.
/home/oliver/reportomni.sh[12]: omnidb: not found.
/home/oliver/reportomni.sh[13]: omnidb: not found.
arg1 Getdate(3C) exit code 7: There is no line in the template that matches the input
*************************************************
Cron: The previous message is the standard output
and standard error of one of your crontab commands:
/home/oliver/reportomni.sh >/home/oliver/reportomni.log
It also doesnt write the log as it is supposed to. The Entries in the crontab are:
50 7 * * * /home/oliver/movelogs.sh >>/home/oliver/reportomni.log
0 8 * * * /home/oliver/reportomni.sh >>/home/oliver/reportomni.log
Can Anybody help me.
if it smell's funny on the outside, it's worse on the inside
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2002 01:37 AM
05-19-2002 01:37 AM
SolutionWhen you run scripts under cron your normal PATH environmental variable is not set the same as when you log in using a shell, so in your cron script set PATH to exactly what you need. eg, at a minimum PATH=$(cat /etc/PATH)
and add on any application directories you need, eg, /opt/omni/bin or whatever.
Im from Palmerston North, New Zealand, but somehow ended up in London...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2002 05:21 AM
05-20-2002 05:21 AM
Re: problem with shell-script and cron
As Stefan says, in cron, the path defaults to /usr/bin:/usr/sbin. Add this to the start of your script:
export PATH=$PATH:/opt/omni/bin:/opt/omni/sbin
This assumes this is the correct (default) path to the omnidb commands.
export PATH=$PATH:/opt/omni/bin:/opt/omni/sbin
This assumes this is the correct (default) path to the omnidb commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2002 05:25 AM
05-20-2002 05:25 AM
Re: problem with shell-script and cron
Oliver,
As a general rule, I code full path names in my shell scripts so this type of problem is avoided. For example /opt/omni/bin/omnidb rather than omnidb.
Good luck,
Pete
Pete
As a general rule, I code full path names in my shell scripts so this type of problem is avoided. For example /opt/omni/bin/omnidb rather than omnidb.
Good luck,
Pete
Pete
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP