webium Posted May 3, 2015 Share Posted May 3, 2015 Hello, I'm trying to call a function every x seconds import BigWorld import threading import time def myCheck(): # my code is here ... # call myCheck() again in 60 seconds threading.Timer(60, myCheck).start() # start calling myCheck now and every 60 sec thereafter myCheck() The code is working, but after closing the client, there is still running process WorldOfTanks.exe Is there a way to stop the timer when closing client? @ Quote Link to comment Short link Share on other sites More sharing options...
Kotyarko_O Posted May 3, 2015 Share Posted May 3, 2015 @webium, BigWorld.callback(60, myCheck) 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Purzel Posted July 5, 2015 Share Posted July 5, 2015 @webium, BigWorld.callback(60, myCheck) def NotificationTimer(): if preventNotificationTimerCall != True: Create_sys_msg() threading.Timer(60, NotificationTimer).start() Call "BigWorld.callback(60, NotificationTimer)" at which event? @ Quote Link to comment Short link Share on other sites More sharing options...
Kotyarko_O Posted July 5, 2015 Share Posted July 5, 2015 (edited) @Purzel, def NotificationTimer(): if preventNotificationTimerCall != True: Create_sys_msg() BigWorld.callback(60, NotificationTimer) Edited July 5, 2015 by Kotyarko_O 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Purzel Posted July 6, 2015 Share Posted July 6, 2015 @Purzel, def NotificationTimer(): if preventNotificationTimerCall != True: Create_sys_msg() BigWorld.callback(60, NotificationTimer) Thx ... @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.