Welcome to FreeSoftwareServers Confluence Wiki

Breakdown of how this works:

Script is executed on Remote Server

The output is redirected to /var/log/"${script}$(date '+%F').log" on Remote Server.

That log is SCP'd back to this server via [scp /var/log/"${script}$(date '+%F').log" root@cron:/var/log/cron/]

(This requires no prompt root access via SSH using RSA Keys)

The log is removed from the Remote Server via [rm /var/log/"${script}$(date '+%F').log"]

At the end of the day, the "Daily E-Mail" Job will [cat /var/log/cron/* | mail -s dev@domain.com]

Then [rm /var/log/cron/*]


Using Build Parameters this Exec command would be :


${script} >> ${log}
scp ${log} ${cronlog}
rm {log}


  • No labels