Run a specific script

Hi,
Is it possible to launch a specific script for each connection by user ?
My idea is to reset the workspace of a user with a default workspace.

Thanks,

Manu

Which spawner do you use? There are different hooks you might want to use.

I do not use a spawner, I will look at this option .
thanks

I solved my problem by setting the variable :
c.JupyterHub.shutdown_on_logout = True
and inserting a command in the jupyter_notebook_config.py of each student, the only problem if the student does not logout, his server remains active and does not take not take into account the modifications.

This is one of the difficulties of administration. You could of course also manually enter each docker container and update these for the users. Anyhow, if people have already significantly changed their docker container, then anyways you will run into troubles. So you might just think about forcing a logout of all users, e.g. by invalidating their login, see How to force re-login for users for more information on that.