Hi all,
I'm trying to execute from crontab a script that uses an interactive shell (swmml, Signalware MML Commands).
I think the problem is about the crontab environment which miss tty/console/terminal etc...
After many tryings and searches I didn't come to a solution.
The program is launched from crontab this way:
15 * * * * su - omniusr -c "swmml -e \'DISPLAY-PROCESS\'" > swmml_D_PROCESS.log 2>&1
I always get this error message in the logfile:
The code in swmml (which is a perl script) that cause the error is:
if (-t STDIN) {
} elsif (-p STDIN) {
if (-B STDIN) {
die 'STDIN is a binary file';
} else {
return 1;
}
} elsif (-S STDIN) {
die 'STDIN is a socket';
} elsif (-c STDIN) {
die 'STDIN is a character special file';
} elsif (-f STDIN) {
if (-B STDIN) {
die 'STDIN is a binary file';
} else {
return 1;
}
} else {
die $baIlaIlI.' doesn\'t know what STDIN is';
}
Does anybody has a suggestion for this issue?
How can I run such command from crontab?
Thanks for your help!!!