Python Forum
Possible to execute a python script before log off/shutdown with input commands?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible to execute a python script before log off/shutdown with input commands?
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)

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.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.

Possibly Related Threads…
Thread Author Replies Views Last Post
  cant use ping, sudo or other commands in remote shell script. throwaway34 7 622 May-17-2021, 11:29 AM
Last Post: throwaway34
  Input function cutting off commands at spaces. throwaway34 3 414 May-12-2021, 06:40 AM
Last Post: throwaway34
  Using python to execute app or cmd that requires admin credentials thewolf 0 426 Mar-05-2021, 08:15 PM
Last Post: thewolf
  Unable to execute input(). jahuja73 5 695 Feb-18-2021, 07:41 AM
Last Post: bowlofred
  Using a .bat file to execute simple anaconda commands in Windows 10 gacg1 0 859 Nov-30-2020, 03:24 PM
Last Post: gacg1
  Raspi Commands via Python (VS Code) Script AS4188 5 674 Oct-21-2020, 03:49 PM
Last Post: AS4188
  Execute DBCC CHECKDB from python script susja 1 569 Aug-12-2020, 02:09 AM
Last Post: susja
  Execute full script samuelbachorik 0 530 Aug-06-2020, 08:09 PM
Last Post: samuelbachorik
  The script won't take voice input ShishirModi 2 567 Jul-21-2020, 05:56 AM
Last Post: ShishirModi
  How to kill a bash script running as root from a python script? jc_lafleur 4 1,404 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020