Bonjour,
J'ai besoin de lancer un script à une heure/date précise, j'ai essayé avec le planificateur de tâche de Windows 10 mais ça ne fonctionne pas bien.
J'ai pensé à utiliser la fonction sleep sinon mais je me demandais s'il n'existais pas un moyen plus simple ?
Merci d'avance pour votre aide
Lancement script à une heure/date spécifiée
-
- Posts: 6
- Joined: 17 Apr 2020, 12:13
Re: Lancement script à une heure/date spécifiée
essaye ca
Code: Select all
#Persistent
date_heure := "2020/04/18 15:52:20"
Mon_Programme := "notepad.exe"
; convertir le format en YYYYMMDDHH24MISS
RegExMatch(date_heure,"O)(\d+)/(\d+)/(\d+) (\d+):(\d+):(\d+)", m)
Loop % m.Count()
scheduled .= m.Value(A_index)
SetTimer, check_if_launch, 1000 ; chaque seconde
return
check_if_launch:
if (A_Now < scheduled)
return ; pas encore
; il est l'heure!
Run, %Mon_Programme%
ExitApp ; quitter
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
-
- Posts: 6
- Joined: 17 Apr 2020, 12:13
Re: Lancement script à une heure/date spécifiée
Merci Joedf, je vais essayer.
-
- Posts: 6
- Joined: 17 Apr 2020, 12:13
Re: Lancement script à une heure/date spécifiée
Super ! ça marche bien !
Re: Lancement script à une heure/date spécifiée
Parfait.
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Return to “J'ai besoin d'aide”
Who is online
Users browsing this forum: No registered users and 48 guests