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
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Locally run an APK and execute functions using Python KovyJ 0 405 Jan-23-2025, 05:21 PM
Last Post: KovyJ
  How to make it so whatever I input into a script gets outputted on a different file spermatozwario 4 1,074 Nov-24-2024, 12:58 PM
Last Post: deanhystad
  Help with graceful shutdown of MP thread with asyncio sawtooth500 3 1,063 Jul-03-2024, 05:29 PM
Last Post: sawtooth500
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 7,810 Jun-29-2023, 11:57 AM
Last Post: gologica
Lightbulb shutdown host from docker container cosmin1805 0 1,593 Nov-27-2022, 06:34 PM
Last Post: cosmin1805
  Os.system("shutdown"); command not found cosmin1805 4 3,123 Nov-13-2022, 02:07 PM
Last Post: cosmin1805
  How To Set Up And Execute A Python File knight2000 4 3,865 May-31-2022, 10:02 AM
Last Post: Larz60+
  execute commands inside a running application mr_byte31 3 2,120 Apr-12-2022, 08:50 AM
Last Post: Larz60+
  execute python script guy7200 1 2,130 Oct-25-2021, 09:55 PM
Last Post: Axel_Erfurt
  Sending string commands from Python to a bluetooth device Rovelin 13 15,397 Aug-31-2021, 06:40 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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