Several customers (eg. Bug 1530) have asked if the job's usage information could be put into the job's end email. The work around is to create a prolog that runs sacct after the job is done, but it's not guaranteed that the information will be in the database in time. The stepd sends the usage information to the controller could put that information in the email.
(In reply to Brian Christiansen from comment #0) > Several customers (eg. Bug 1530) have asked if the job's usage information > could be put into the job's end email. The work around is to create a prolog You mean EpilogSlurmctld rather Prolog and that could potentially include a sleep to wait for the accounting information to propagate.
Hopefully there is no reason to use any kind of epilog since you can just get the information when the step completes and keep that info for the the email as stated in comment 1.
The "smail" script from Princeton will handle this. See: https://github.com/SchedMD/slurm/commit/93d9189c35be9d603cfedb09b55c4110a9b5779a Essentially this is a wrapper for mail, as forked and exec'ed by slurmctld to notify users of job state changes. It waits for the usage information to become available and includes it in the email.