I'm calling at jobs on AIX servers using this method:/usr/bin/at now +1 minute << EOFchmod 700 /var/tmp/somescript.shcd /var/tmpsh /var/tmp/somescript.sh > 2>&1EOFIf ever some output is generated (because i.e. the script I'm calling doesn't exist), an email is sent to the default mail configured for cron jobs. I know this is default behavior and that is fine. However, if I want to change the MAILTO variable used, how can I do it using the method above ?I tried adding MAILTO=myaddress@mydomain.com in the at script but that didn't work. The mail still went to the default address.i.e./usr/bin/at now +1 minute << EOFMAILTO=myaddress@mydomain.comchmod 700 /var/tmp/somescript.shcd /var/tmpsh /var/tmp/somescript.sh > 2>&1EOFThe reason I'm using this method is because the jobs are created on a fly by another system, but this is irrelevant. I need to do it this way and can't edit the crontab.
How can I set the MAILTO variable for an at job on AIX?
cron;aix;at