Python Forum

Full Version: Possible to execute a python script before log off/shutdown with input commands?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all

I have created a program that captures the current time and records this into a spreadsheet using a combination of the ‘xlwings’ and xlwriter’ packages. It also has various ‘input’ arguments that make the user enter information in capturing this information

I would like essentially for this program to run on log off of the current user (or even shutdown of the computer if this is not possible).

I have tried task scheduler, but there does not seem to be an option for this. Is there another option I have available? Also, would I actually be able to basically halt the logoff command until the python script has been fully completed? (given there are input commands)

Ty
this will be an issue of the particular system involved. the answer will be almost the same across all programming languages and different between different platforms. it is not a Python question.