STDOUT is getting some strange output:
ignored attr: {}abstract
All of my SOAP calls are working fine but this is just annyoing my cron job :)
Thanks
STDOUT is getting some strange output:
ignored attr: {}abstract
All of my SOAP calls are working fine but this is just annyoing my cron job :)
Thanks
You can squelch stdout by redirecting it to /dev/null:
commandname >/dev/null
You can squelch stderr by redirecting it to /dev/null:
commandname 2>/dev/null
You can squelch both stdout and sderr by redirecting both to /dev/null:
commandname &>/dev/null
However these methods would squelch any genuine errors your script might be giving.
A somewhat a better option is to let nohup run your script and redirect the output (both stdout and stderr) to nohup.out:
nohup commandname
... this way your cron won't receive any errors (and won't send an error email to you), but you can still periodically check for the contents of nohup.out, just make sure it gets created in the proper directory (maybe nohup has options for that, lacking that you'll have invoke nohup from the particular directory where you want nohup.out to be created).
But even better would be to just suppress this single line using grep:
commandname | grep -v 'ignored attr: {}abstract'
... (make sure you use proper shell escaping there, I just put it between apostrophes '' but the braces {} might need other escaping) this way you only suppress occurences of this particular message from stdout, but let all other messages get through. so you won't get an email if this is the only kind of thing emitted by your script, but you will get email if the script outputs other messages - which I guess is pretty close to what you want.
Perfect solution of course would be to delve into the script and find and fix what is causing the message.