免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 13944 | 回复: 12
打印 上一主题 下一主题

crontab 执行日志里面报错 Not a terminal [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-07-30 15:33 |只看该作者 |倒序浏览
系统OS : hpux 11i

在crontab -e  zxin10

15 * * * * /home/zxin10/zyf/aaa.sh > /dev/null

中增加执行命令aaa.sh,aaa.sh是可以执行成功的!

aaa.sh 内容如下:
########
#!/usr/bin/sh
. /home/zxin10/.profile
/usr/bin/ftp -n 12.198.130.132 <<!
user root 123uuuu
bin
cd /home
get my_test
!
#######
但没有出现最终结果, my_test

查看/var/mail/zxin10

Subject: cron

Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter


*************************************************
Cron: The previous message is the standard output
      and standard error of one of your crontab commands:

/home/zxin10/zyf/aaa.sh > /dev/null


请高手指点!
谢谢!

论坛徽章:
0
2 [报告]
发表于 2006-07-30 16:41 |只看该作者
增加了:
export term=VT100 还是不行!

论坛徽章:
0
3 [报告]
发表于 2006-07-30 17:11 |只看该作者
如何在hpux里面设置终端啊?
郁闷!

论坛徽章:
0
4 [报告]
发表于 2006-07-30 18:03 |只看该作者
#!/bin/csh
setenv TERM vt100

#!/bin/bash
export TERM=vt100

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
5 [报告]
发表于 2006-07-31 00:56 |只看该作者
. /home/zxin10/.profile

你的/home/zxin10/.profile里写了什么? 会不会跟这个文件的配置有关?

论坛徽章:
8
摩羯座
日期:2014-11-26 18:59:452015亚冠之浦和红钻
日期:2015-06-23 19:10:532015亚冠之西悉尼流浪者
日期:2015-08-21 08:40:5815-16赛季CBA联赛之山东
日期:2016-01-31 18:25:0515-16赛季CBA联赛之四川
日期:2016-02-16 16:08:30程序设计版块每日发帖之星
日期:2016-06-29 06:20:002017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之佛山
日期:2017-02-27 20:41:19
6 [报告]
发表于 2006-07-31 08:14 |只看该作者
#!/usr/bin/sh
stty() { :; }
. /home/zxin10/.profile
/usr/bin/ftp -n 12.198.130.132 <<!

论坛徽章:
0
7 [报告]
发表于 2006-07-31 08:14 |只看该作者
为什么要执行. /home/zxin10/.profile
这个阿

论坛徽章:
0
8 [报告]
发表于 2006-07-31 09:08 |只看该作者
原帖由 古道西风 于 2006-7-31 08:14 发表
为什么要执行. /home/zxin10/.profile
这个阿



这个只是让一些环境变量生效的!

其实可以不用它的!


谢谢楼上的指点,我再试试!

因为只有字符界面,有人说这么设置: TERM=ansi  可以吗?

是 sh 模式的,谢谢哦!

论坛徽章:
0
9 [报告]
发表于 2006-07-31 09:30 |只看该作者
.profile 中设置如下:
###########################
# Set up the terminal:
        if [ "$TERM" = "" ]
        then
                eval ` tset -s -Q -m 'hp' `
        else
                eval ` tset -s -Q `
        fi
        stty erase "^H" kill "^U" intr "^C" eof "^D"
        stty hupcl ixon ixoff
        tabs

# Set up the search paths:
        PATH=$PATH:.

# Set up the shell environment:
        set -u
        trap "echo 'logout'" 0

# Set up the shell variables:
        EDITOR=vi
        export EDITOR

#################

论坛徽章:
0
10 [报告]
发表于 2006-07-31 09:57 |只看该作者
原帖由 waker 于 2006-7-31 08:14 发表
#!/usr/bin/sh
stty() { :; }
. /home/zxin10/.profile
/usr/bin/ftp -n 12.198.130.132 <<!


有进步了,现在报错只有:


Subject: cron

Not a terminal


*************************************************
Cron: The previous message is the standard output
      and standard error of one of your crontab commands:

/home/zxin10/zyf/aaa.sh > /dev/null




Not a terminal !!! ???

我在:
stty() { :; }
. /home/zxin10/.profile
#
export TERM=ansi
#
/usr/bin/ftp -n 12.198.130.132 <<!

增加了,也报告同样的错误,郁闷了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP