Professional Web Applications Themes

Terminal type and Cron - SCO

Hi, I added a new task in the Crontab scheduler and everytime it runs I get an error "Terminal type not found". The task is a shell script I wrote that runs a report generator to create a report file (dreport of FilePro). I do redirect all the output to /dev/null. My question is: Does anyone knows how to set a terminal type for an application being run by Cron? Pleas help, Yoram...

  1. #1

    Default Terminal type and Cron

    Hi,

    I added a new task in the Crontab scheduler and everytime it runs I
    get an error "Terminal type not found".

    The task is a shell script I wrote that runs a report generator to
    create a report file (dreport of FilePro). I do redirect all the
    output to /dev/null.

    My question is: Does anyone knows how to set a terminal type for an
    application being run by Cron?

    Pleas help,

    Yoram
    Yoram Guest

  2. #2

    Default Re: Terminal type and Cron

    Yoram typed (on Thu, Oct 16, 2003 at 01:38:48PM -0700):
    |
    | I added a new task in the Crontab scheduler and everytime it runs I
    | get an error "Terminal type not found".
    |
    | The task is a shell script I wrote that runs a report generator to
    | create a report file (dreport of FilePro). I do redirect all the
    | output to /dev/null.
    |
    | My question is: Does anyone knows how to set a terminal type for an
    | application being run by Cron?

    This is a classic filePro problem. None of its modules run without a
    TERM setting (any TERM setting will do).

    Cron or no cron, you set any variable into the environment of a Bourne
    shell command by preceding the command with variable=whatever.

    So change your crontab line from

    dreport ... ...
    to
    TERM=ansi dreport ... ...


    Then subscribe to the filePro mailing list:

    The procedure to subscribe/unsubscribe to the filepro list is
    to send mail to org with commands IN THE BODY
    of the e-mail message (subject is ignored). The command to
    subscribe/unsubscribe:

    [un]subscribe filepro-list [optional_e_mail_address]
    end

    --
    JP
    Jean-Pierre Guest

  3. #3

    Default Re: Terminal type and Cron

    In article <google.com>,
    Yoram <com> wrote: 
     

    You would have seen this if you'd keep up with the filePro list.
    It's one of the most asked problems since about 1983.

    Just put a TERM type in your shell script. FP is picky in that it
    wants a terminal that is defined in it's termcap - so put
    TERM=<whateveryounormallyuseforterm> in the script.


    --
    Bill Vermillion - bv wjv . com
    Bill Guest

  4. #4

    Default Re: Terminal type and Cron

    On Thu, Oct 16, 2003 at 01:38:48PM -0700, Yoram wrote: 

    since you dont mention o/s or its version, lets assume for
    least-common-denominator sake that you can't set environment
    for cron commands outside your crontab.

    if TERM is all you need, try something like
    TERM=ansi /appl/fp/dreport fpfile -f format_name.....

    you may find yourself tweaking more than just that, however, and
    in the end you may be better off writing it all in a shell
    script and calling just the shell script from cron.

    that way you might have
    PFMBTO=1; export PFMBTO (useful in cron scripts so don't wait for user
    input on error)
    TERM=ansi; export TERM
    maybe call /appl/fp/ddir fpfile -l
    to remove lockfile beforehand, if appropriate, and maybe some comments,
    logging, etc.

    you may also find you'll get decent filepro support from filepro
    mailing list, hosted at seaslug.org - email off-list if you want
    subscribe info.

    --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ---
    -Joe Chasan- Magnatech Business Systems, Inc.
    com Hicksville, NY - USA
    http://www.MagnatechOnline.com Tel.(516) 931-4444/Fax.(516) 931-1264
    Joe Guest

  5. #5

    Default Re: Terminal type and Cron

    Bill Vermillion typed (on Thu, Oct 16, 2003 at 09:25:02PM +0000):
    | In article <google.com>,
    | Yoram <com> wrote:
    | >Hi,
    | >
    | >I added a new task in the Crontab scheduler and everytime it runs I
    | >get an error "Terminal type not found".
    |
    | >The task is a shell script I wrote that runs a report generator to
    | >create a report file (dreport of FilePro). I do redirect all the
    | >output to /dev/null.
    |
    | You would have seen this if you'd keep up with the filePro list.
    | It's one of the most asked problems since about 1983.
    |
    | Just put a TERM type in your shell script. FP is picky in that it
    | wants a terminal that is defined in it's termcap - so put
    | TERM=<whateveryounormallyuseforterm> in the script.

    Actually, TERM (or PFTERM) can be set to any old termtype whatsoever.
    For example,

    PFTERM=vwpt78 dreport ... ...

    is peachy-keen. And you'd usually want to throw away dreport's screen
    output rather than get junk email, thus:

    PFTERM=vwpt78 dreport ... ... ... 2>&1 > /dev/null

    --
    JP
    Jean-Pierre Guest

  6. #6

    Default Re: Terminal type and Cron

    On Thu, Oct 16, 2003, Yoram wrote: 

    The usual way is to set it in a shell script executed by cron:

    #!/bin/sh
    TERM=xterm; export TERM
    # rest of your script.

    One way to make sure you get a realistic set of environment variables is to
    use the output of the ``env'' command to get the environment from a shell
    session: ``env > myscript.sh'' then edit myscript.sh appropriately.

    Bill
    --
    INTERNET: COM Bill Campbell; Celestial Software LLC
    UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
    FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
    URL: http://www.celestial.com/

    ``It's not what you pay a man but what he costs you that counts.''
    Will Rogers
    Bill Guest

  7. #7

    Default Re: Terminal type and Cron

    In article <mi.celestial.com>,
    Bill Campbell <com> wrote: 
     [/ref]
     [/ref]
     [/ref]
     
     
     

    Here's an idea for an enhancement. Some of the OpenSource systems
    actually ship with variables defined in the root crontab
    of PATH, SHELL, and HOME. [the latter pointing to the log area].
    Those are at the top of the crontab. It could take care of
    questions like this. Add TERM and make it generice like VT100
    and you'd be pretty well covered from forgetting any environemental
    variables a program would need.

    Bill

    dd

    --
    Bill Vermillion - bv wjv . com
    Bill Guest

  8. #8

    Default Re: Terminal type and Cron

    Bill Vermillion typed (on Fri, Oct 17, 2003 at 04:15:09PM +0000):
    | In article <mi.celestial.com>,
    | Bill Campbell <com> wrote:
    | >On Thu, Oct 16, 2003, Yoram wrote:
    |
    | >>I added a new task in the Crontab scheduler and everytime it runs I
    | >>get an error "Terminal type not found".
    |
    | >>The task is a shell script I wrote that runs a report generator to
    | >>create a report file (dreport of FilePro). I do redirect all the
    | >>output to /dev/null.
    |
    | >>My question is: Does anyone knows how to set a terminal type for an
    | >>application being run by Cron?
    |
    | >The usual way is to set it in a shell script executed by cron:
    |
    | >#!/bin/sh
    | >TERM=xterm; export TERM
    | ># rest of your script.
    |
    | >One way to make sure you get a realistic set of environment variables is to
    | >use the output of the ``env'' command to get the environment from a shell
    | >session: ``env > myscript.sh'' then edit myscript.sh appropriately.
    |
    | Here's an idea for an enhancement. Some of the OpenSource systems
    | actually ship with variables defined in the root crontab
    | of PATH, SHELL, and HOME. [the latter pointing to the log area].
    | Those are at the top of the crontab. It could take care of
    | questions like this. Add TERM and make it generice like VT100
    | and you'd be pretty well covered from forgetting any environemental
    | variables a program would need.

    Starting in OSR 5.0.7, /etc/default/cron lets you define any environemnt
    variables you wish.

    --
    JP
    Jean-Pierre Guest

  9. #9

    Default Re: Terminal type and Cron

    In article <jpr.com>,
    Jean-Pierre Radley <com> wrote: 
     

    Good news. Are any set up by default?

    Bill

    --
    Bill Vermillion - bv wjv . com
    Bill Guest

  10. #10

    Default Re: Terminal type and Cron

    Bill Vermillion typed (on Fri, Oct 17, 2003 at 06:15:07PM +0000):
    | >|
    | >| Here's an idea for an enhancement. Some of the OpenSource systems
    | >| actually ship with variables defined in the root crontab
    | >| of PATH, SHELL, and HOME. [the latter pointing to the log area].
    | >| Those are at the top of the crontab. It could take care of
    | >| questions like this. Add TERM and make it generice like VT100
    | >| and you'd be pretty well covered from forgetting any environemental
    | >| variables a program would need.
    |
    | >Starting in OSR 5.0.7, /etc/default/cron lets you define any environemnt
    | >variables you wish.
    |
    | Good news. Are any set up by default?

    As shipped:

    CRONLOG=NO
    MAXLOGSIZE=2048
    MAXRUN=100
    NOTESHELL=NO
    INPUT=YES
    OLDPARSING=NO
    setenv SHELL=/bin/sh
    setenv PATH=/bin:/usr/bin:/usr/lbin
    # historic, insecure default path
    # setenv PATH=.:/bin:/usr/bin:/usr/lbin

    --
    JP
    Jean-Pierre Guest

  11. #11

    Default Re: Terminal type and Cron

    Jean-Pierre Radley <com> wrote in message news:<jpr.com>... 

    Note also that this can be added to 5.0.[456] by installing oss642a

    /setup_gnu ftp://ftp.sco.com/pub/openserver5/oss642a


    oh ok ok.. :)

    wget -O /tmp/VOL.000.000 ftp://ftp.sco.com/pub/openserver5/oss642a
    custom -i -p SCO:OSS642a -z /tmp


    oh ok ok.. completetly stock commands this time :)

    cd /tmp
    rftp -g -bh ftp.sco.com /pub/openserver5 oss642a
    mv oss642a VOL.000.000
    custom -i -p SCO:OSS642a -z /tmp

     
    Brian Guest

Similar Threads

  1. Term::Cap -- Setting terminal type under Windows XP
    By Chubasco in forum PERL Modules
    Replies: 3
    Last Post: June 1st, 11:10 AM
  2. Replies: 3
    Last Post: August 21st, 12:21 AM
  3. Replies: 0
    Last Post: July 1st, 02:04 PM
  4. Problem with character palette and Tracking field: can't type zero after type is modified
    By Tim_Murray@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 0
    Last Post: May 11th, 04:21 PM
  5. open controlling terminal from cron
    By Charles in forum UNIX Programming
    Replies: 4
    Last Post: September 8th, 10:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139