HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tty problem with Cron Job
Operating System - HP-UX
1833184
Members
2832
Online
110051
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
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
12-28-2004 12:54 PM
12-28-2004 12:54 PM
tty problem with Cron Job
Hi, is it true that when I run a shell script command with cron job, cron job will not know what terminal it is on?
Can I set the terminal for my application, to a specific terminal eg /dev/pts/2 in a cron job.
Or should I do that in my shell script.But how?
Thank You
Can I set the terminal for my application, to a specific terminal eg /dev/pts/2 in a cron job.
Or should I do that in my shell script.But how?
Thank You
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 01:22 PM
12-28-2004 01:22 PM
Re: tty problem with Cron Job
Yes, this is true.
You can set the variable TERM in the script.
You can even if you wish pull your stty statements from /etc/profile or .profile and put them in the script.
Usually if the job needs a TERM variable set, thats enough.
Another thing to check in cron jobs: PATH
cron provides its jobs no environment whatsoever, they need to do that for themselves.
SEP
You can set the variable TERM in the script.
You can even if you wish pull your stty statements from /etc/profile or .profile and put them in the script.
Usually if the job needs a TERM variable set, thats enough.
Another thing to check in cron jobs: PATH
cron provides its jobs no environment whatsoever, they need to do that for themselves.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
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
12-28-2004 01:25 PM
12-28-2004 01:25 PM
Re: tty problem with Cron Job
Hi, is it true that when I run a shell script command with cron job, cron job will not know what terminal it is on?
===
I have just tried writing small script to detect what tty crontab used.
#!/usr/sbin/sh
tty>/tmp/ttyid.log
and setting crontab.
and check
#cat /tmp/ttyid.log
not a tty.
It mean crontab does not use shell as tty.
--
Can I set the terminal for my application, to a specific terminal eg /dev/pts/2 in a cron job.
---
You can not set it. The Os will assign for you.
can you give me you shell script.
===
I have just tried writing small script to detect what tty crontab used.
#!/usr/sbin/sh
tty>/tmp/ttyid.log
and setting crontab.
and check
#cat /tmp/ttyid.log
not a tty.
It mean crontab does not use shell as tty.
--
Can I set the terminal for my application, to a specific terminal eg /dev/pts/2 in a cron job.
---
You can not set it. The Os will assign for you.
can you give me you shell script.
HP is simple
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 04:44 PM
12-28-2004 04:44 PM
Re: tty problem with Cron Job
Thanks a lot guys.
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