- 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
тАО03-06-2010 12:05 PM
тАО03-06-2010 12:05 PM
Cron Job issue
The cron job is not running. Enclosed is the details.
HP-UX: 11.23
-----------------
Error:
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
stty: : Not a typewriter
age is the standard output
and standard error of one of your crontab commands:
------------------------
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2010 12:33 PM
тАО03-06-2010 12:33 PM
Re: Cron Job issue
So, what's in
"/cardprod/batches/LiveSync.sh", and is it
(somehow) doing a bunch of commands (like,
say, "stty") which make sense only with an
interactive terminal (which a "cron" job does
not have)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2010 12:38 PM
тАО03-06-2010 12:38 PM
Re: Cron Job issue
----------------------------
#This script must be invoked by crontab once every minute to process HPS embossing files
. /.profile > /dev/null
export PROC_EXEC=/cardprod/batches
#while true
#do
sleep 10
echo -----------------------------------
java -classpath /cardprod/batches/ LiveSync
echo -----------------------------------
sleep 30
java -classpath /cardprod/batches/ LiveSync
#done
-------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2010 12:49 PM
тАО03-06-2010 12:49 PM
Re: Cron Job issue
> . /.profile > /dev/null
So, I'll guess that "Previously" involved a
different "/.profile" (or "/etc/profile", or
some other thing which gets sucked in
directly or indirectly by this ".profile").
Wow. I would not use a hard-coded name of
"/.profile", either. Around here, root's
home is "/root", so there is no "/.profile".
I'd think that "~root/.profile" would be more
reliable (especially on a Linux system, where
"/root" is common).
A search for keywords like, say,
cron stty
might find some examples of popular ways to
restrict execution of commands like "stty" to
interactive situations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2010 04:49 PM
тАО03-06-2010 04:49 PM
Re: Cron Job issue
How do you know it's not running? Other than the extra output, it might be working fine?
>. /.profile > /dev/null
If you don't want to fix your ~/.profile, you could redirect stderr too:
. ~/.profile > /dev/null 2>&1
>This script must be invoked by crontab once every minute
Looks like it only needs to be invoked once by cron and then it does runs every 10 then 30 seconds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2010 05:21 PM
тАО03-06-2010 05:21 PM
Re: Cron Job issue
The script is for moving the file from one folder to the other folder. We colud see the files are available in the generated path itself.
What is the issue with the profile? Earlier the same script was working fine. Any modification required, please let me know.
------------------------
Error in: /var/mail/root.
From root@hphost25 Sat Mar 6 23:32:00 uae 2010
Received: (from root@localhost)
by hphost25 (8.11.1 (PHNE_35951)/8.11.1) id o26JW0V14578
for root; Sat, 6 Mar 2010 23:32:00 +0400 (uae)
Date: Sat, 6 Mar 2010 23:32:00 +0400 (uae)
From: root@hphost25
Message-Id: <201003061932.o26JW0V14578@hphost25>
Subject: cron
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
stty: : Not a typewriter
age is the standard output
and standard error of one of your crontab commands:
/cardprod/batches/LiveSync.sh>>/cardprod/batches/logs/ProcessFiles.log &
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2010 05:56 PM
тАО03-06-2010 05:56 PM
Re: Cron Job issue
script: /cardprod/batches/LiveSync.sh>>/cardprod/batches/logs/ProcessFiles.log &
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2010 05:58 PM
тАО03-06-2010 05:58 PM
Re: Cron Job issue
Did you redirect stderr as I mentioned?
. ~/.profile > /dev/null 2>&1
If your script isn't moving the files, change the "#!" line to add "-x" to the end. This will trace execution and may give an idea where it fails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2010 09:26 PM
тАО03-06-2010 09:26 PM
Re: Cron Job issue
> cron stty
> [...]
I tried Google with:
cron stty "Not a typewriter"
and found (among many):
http://muzso.hu/2007/08/06/fixing-stty-errors-during-crontab-scripts-on-hp-ux
which looked reasonable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2010 02:53 AM
тАО03-07-2010 02:53 AM
Re: Cron Job issue
Issue resolved. Above mentioned file is calling a configuration file for the details. In that IP mentioned was wrong. We have changed the same.
Once again thanks....