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?
#1
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
Reply


Messages In This Thread
Possible to execute a python script before log off/shutdown with input commands? - by Kaltex - May-17-2021, 02:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,260 Jun-29-2023, 11:57 AM
Last Post: gologica
Lightbulb shutdown host from docker container cosmin1805 0 957 Nov-27-2022, 06:34 PM
Last Post: cosmin1805
  Os.system("shutdown"); command not found cosmin1805 4 1,685 Nov-13-2022, 02:07 PM
Last Post: cosmin1805
  How To Set Up And Execute A Python File knight2000 4 1,913 May-31-2022, 10:02 AM
Last Post: Larz60+
  execute commands inside a running application mr_byte31 3 1,339 Apr-12-2022, 08:50 AM
Last Post: Larz60+
  execute python script guy7200 1 1,603 Oct-25-2021, 09:55 PM
Last Post: Axel_Erfurt
  Sending string commands from Python to a bluetooth device Rovelin 13 9,487 Aug-31-2021, 06:40 PM
Last Post: deanhystad
  Python library for win32 console commands eldiener 3 3,472 Aug-24-2021, 10:28 PM
Last Post: bowlofred
  cant use ping, sudo or other commands in remote shell script. throwaway34 7 3,602 May-17-2021, 11:29 AM
Last Post: throwaway34
  Input function cutting off commands at spaces. throwaway34 3 2,209 May-12-2021, 06:40 AM
Last Post: throwaway34

Forum Jump:

User Panel Messages

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