- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron Job Issue
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
тАО02-23-2010 04:09 AM
тАО02-23-2010 04:09 AM
We have created one script to collect recent files(when this script executed, it will check less than one hour time stamp files) and zip that files and transfer to other server.
When i run the script manually, it is working properly.
I tried with cron job. But it is not taking any files & zip file is created with 0 bytes and transferred to other server.
I am confusing why it is not executing with correct output only in cron job.
Kindly clarify on this.
Thanks in Advance
Shameem
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 04:13 AM
тАО02-23-2010 04:13 AM
Solutioncheck on the "cron logs" to send some light on your problem
/var/adm/cron/log ? and also it could better if you can post "entry of your crontab" and location of the script which you are calling
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 04:13 AM
тАО02-23-2010 04:13 AM
Re: Cron Job Issue
Try to set up in your srcipt the shell you are using and set the PATH variable (copy the value from profile)
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 04:20 AM
тАО02-23-2010 04:20 AM
Re: Cron Job Issue
Find cron entry. i changed the time now for testing.
50 14 * * * /home/eppadm/scripts/epp-sync-j2ee-daily.sh
Log file information below.
> root 6826 c Tue Feb 23 14:50:00 WAT 2010
> CMD: /home/eppadm/scripts/epp-sync-j2ee-daily.sh
> root 6827 c Tue Feb 23 14:50:00 WAT 2010
< root 6825 c Tue Feb 23 14:50:00 WAT 2010
< root 6826 c Tue Feb 23 14:50:01 WAT 2010
< root 6827 c Tue Feb 23 14:51:18 WAT 2010
#!/bin/sh shell information updated in the script.
Which PATH variable need to set?
Kindly check and provide your feedback.
Thanks in Advance
Shameem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 04:20 AM
тАО02-23-2010 04:20 AM
Re: Cron Job Issue
Looks like environment and PATH for the commands in your script is not defined.
Define it PATH variable in your script or replace each command with its absolute path.
Regards!
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 04:21 AM
тАО02-23-2010 04:21 AM
Re: Cron Job Issue
/home/eppadm/scripts/epp-sync-j2ee-daily.sh
And define the PATH in there (get it from profile)
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 04:22 AM
тАО02-23-2010 04:22 AM
Re: Cron Job Issue
Also check for the absolute path of the script in your crontab.
Check for the permission of the script/file & the directory structure.should have execute permission for the script file for the owner of the sript/file.
Rgds.,
Sachin Kumbla.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 04:22 AM
тАО02-23-2010 04:22 AM
Re: Cron Job Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 04:24 AM
тАО02-23-2010 04:24 AM
Re: Cron Job Issue
#
PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:.....
Copy the value from your user's profile.
Horia
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 04:58 AM
тАО02-23-2010 04:58 AM
Re: Cron Job Issue
I updated PATH. i have taken path details from /etc/profile.
Still it is not working... Again i am telling this script is working properly when i execute manually :).
I have attached script in the attachment.