Can Imsched Redirect Stdout And Stderr?
(Doc ID 2175784.1)
Last updated on NOVEMBER 06, 2019
Applies to:Oracle Communications Messaging Server - Version 7.0.0 and later
Information in this document applies to any platform.
Can imsched redirect stdout and stderr?
We have some scripts which we were running under cron, but it makes more sense for imsched to run them.
In cron, we had like this:
* * * * * /gcs/app/mail/scripts/hubble/bin/run_hubble_min.sh > /gcs/app/mail/scripts/hubble/logs/min.log 2>&1
We want to keep a log of the last time it ran. That log is usually null because it usually produces no output. If it is failing, we expect it to be a consistent failure. So we don't need log of every time it runs. If it is failing, the most recent log will be sufficient.
The above works fine in cron.
Putting the same thing into imsched seems to work in that the script gets run and the data is collected.
But when it was run by cron, the file to which stdout/stderr are redirected is created new/empty every time it runs.
When run by imsched, it seems that file is never updated.
It looks like imsched is doing fork/exec of the script and passing the rest as command line options rather than feeding the whole thing to a shell and allowing the shell to do the redirect (like cron did).
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document