Raised This Month: $51 Target: $400
 12% 

Exact time with Task Scheduler


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MihailoZ
Member
Join Date: Aug 2013
Old 10-19-2019 , 09:32   Exact time with Task Scheduler
Reply With Quote #1

Hi,

I would like to know if it's possible to make a task that will run at 18:10:45 using this plugin https://forums.alliedmods.net/showthread.php?t=1263 ?
__________________
mhvtnns

Last edited by MihailoZ; 10-19-2019 at 09:33.
MihailoZ is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-19-2019 , 11:22   Re: Exact time with Task Scheduler
Reply With Quote #2

Try:

amx_task "18:10:45" "command" tr

Edit: Looking at how that plugin is coded, I am doubtful, it is much less complicated than I was expecting.
__________________

Last edited by Bugsy; 10-19-2019 at 11:26.
Bugsy is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 10-19-2019 , 15:17   Re: Exact time with Task Scheduler
Reply With Quote #3

if it cant affect seconds (dont have time now to look at the code)...make it to 18:10 to call pre_your_func1 so

pre_your_func1 would have set_task of 45 sec for your_func1..no?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-19-2019 , 15:39   Re: Exact time with Task Scheduler
Reply With Quote #4

That plugin works but has a few things wrong. With very few changes it can handle seconds. It was so simple to make possible, I'm not sure why the coder didn't do this to begin with. Literally as simple as changing get_time("%H:%M",curtime,charsmax(curtime)) to get_time("%H:%M:%S",curtime,charsmax(curtime) ) and expanding the string size that holds the time value to accommodate seconds and changing the set_task() interval to 1.0 second.

Tested and works with this (without the extra spaces in the time): amx_task "15 : 37 : 00" "changelevel de_dust" t

Spoiler
__________________

Last edited by Bugsy; 10-19-2019 at 15:43.
Bugsy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode