- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- abouy cron job
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
Discussions
Discussions
Forums
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
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
тАО09-01-2007 06:57 PM
тАО09-01-2007 06:57 PM
#!/bin/ksh
typeset -i weekdayb
weekdayb=`date +%u`
typeset -i tapeslotb
tapeslotb=${weekdayb}+20
/opt/omni/lbin/uma -ioctl /dev/rac/c12t0d0 <
exit
EOF
crontab -l
50 20 * * * /home/move.sh 1>>/home/scripts/LOGS/move_tape_to_D2.sh.log 2>&1 &
who can help me to find why the cron job can not take effect, while I can manually run it?
Louis
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2007 08:34 PM
тАО09-01-2007 08:34 PM
SolutionIn your cron job
env > /tmp/cronjob.txt
from command line
env > /tmp/notcronjob.txt
cron has no PATH or any other variable. That is why your cron job does not work.
If you set PATH in your job and other important environmental variables from normal run environment, your cron job will start to work.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2007 05:47 AM
тАО09-02-2007 05:47 AM
Re: abouy cron job
http://docs.hp.com/en/B2355-60130/crontab.1.html
What is logged in your logfile?
>SEP: cron has no PATH
This isn't true. It is limited to: PATH=/usr/bin:/usr/sbin:.
This should cover date(1).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2007 06:10 AM
тАО09-02-2007 06:10 AM
Re: abouy cron job
cron has a limited PATH variable.
Doesn't really change anything, establishing a proper PATH variable fixed the script.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2007 09:10 PM
тАО09-02-2007 09:10 PM
Re: abouy cron job
at first I would drop the backgrounding of the cronjob - reomove the last '&'.
The next question is, what does your logfile say?
mfG Peter