The 'user' is a Scheduled Task from a Windows Server that logs in every hour on the 15 mark and downloads forms that have been filled out by users in the company's web server (FreeBSD box).
When this task is complete, and I am now thinking the bash script should run when the fetch user logs out, as I need to perform some cleanup e.g. zip up all the files that were downloaded in a dir under his user directory and move them to a different directory under his user directory and then remove all the files from the first directory.
Reading what you wrote here:
Trivially you could put things in the users
~/.bash_(login|profile) file ... you could put
them in /etc/profile or /etc/profile.d/myMaintenance.sh
Does that mean if I place my script in one of those directories it will fire when he logs in, how about when he logs out?
Thank you again for your time.