Automator Folder Action Help

automator

I'm just getting started with automator. So far, i've created an application that runs at user login that gathers all the items from trash and from a folder that I use for ARD installs and securely deletes them.

I'd love to make this task run at logout and would like to know how to set that up. Logout hook?

Next, on my OSX server, I have a folder where PDFs are sent to from my iPads. I need to take those PDFs, watermark them, and move them to another folder. I have an automator action that will do this, but i'm having trouble getting it setup to run in the background WITHOUT anyone logged in to the server. I've currently got this configured as an application, but it seems like it should be a folder action, but I can't figure out where to specify the folder action for the folder action automator type. Also, how to get it to run on the server w/o anyone logged in?

Best Answer

Automator requires a graphical user session to run within. Regrettably, Automator can not run without a user session; this is because it is an application rather than a command line process.

Because of this requirement, running an Automator workflow at log-out is difficult. You need to run the workflow and delay the requested log-out until the workflow finishes.

If the tasks could be performed from a shell script, then this would be easier to hook into the log in and out steps.