[comp.sys.apollo] cron and xdmc not friends ?

dbfunk@ICAEN.UIOWA.EDU (David B. Funk) (01/25/89)

WRT posting <5807@sdcsvax.UUCP> by Sisko Rondonuwu,

> We have a script that uses xdmc command. This script runs fine
> from a shell, but if I put this script in my crontab file, it
> is not executed successfully.

The utility "xdmc" will only work when it is run in an environment
that has its standard-out stream connected to a transcript-pad. IE
run in a shell in a window. There is no way that I know of to circumvent
this requirement. This can easily be seen with the following experiment:

$ xdmc wp > /dev/null
?(xdmc)  Error executing DM command "wp" - stream is not a pad (display manager/Pad manager)

There may be a way to achieve the desired results with a little work.
Write a program that:
    first creates a transcript-pad,
    then reads its command line arguments & puts them in a string,
    then executes the system call pad_$dm_cmd with the stream ID
        from the first operation & the string from the second.

 "xdmc" basically does the last 2 parts of this procedure, with
the 'std-out' stream. This procedure has some drawbacks: it may fail if
the window can't be created (a gpr_borrow mode program is running, or too many
windows are already open), it will create a window on the screen (which could
be annoying to users at that node), or the DM may not have the access rights
required to preform the requested operation due to the currently logged in user.

Dave Funk