The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
f_onserver_timer
Author Message
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #1
f_onserver_timer
sphere.ini:

Code:
// Amount of minutes to call f_onserver_timer (0 disables this, default)
TimerCall=10

spheretriggers:

Code:
[FUNCTION f_onserver_timer]

LOCAL.TODAY = <serv.rtime.format %w>
LOCAL.HOUR  = <serv.rtime.format %H>

IF (<LOCAL.HOUR> == 13)
SERV.B TEST_TEST_TEST
ENDIF

This works, but multiply times on server time 13:00. (like 13:12, 13:45, 13:25)...

The time seems to be pretty random too.
The message came after 12, 13 and 15 minutes more or less, never exactly 10 minutes as stated on the .ini

I want this to make some functions automated on the server.
Can someone help me to improve this?

I would like it to be at some exact time, but no clue on how to do that.

Thanks everyone!
11-22-2013 12:40 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
f_onserver_timer - pinku - 11-22-2013 12:40 AM
RE: f_onserver_timer - Runcuks - 11-22-2013, 03:13 AM
RE: f_onserver_timer - pinku - 11-22-2013, 04:26 AM
RE: f_onserver_timer - RanXerox - 11-22-2013, 05:10 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)