Delete temp data on workers after job is done

Hello,

is there any option how to automatically clear a temp data on workers?

Example:
Worker0 - send data for rendering
W1-5 - receive data in temp folder and finish the job. After that data remains in temp folder until a new task arrives.

I want to delete this data immediately after job is done.

Thanks for your advice.

You need to create a python script that clears the temp directory and add it to the job as either a post job script or a post task script.