Customizing SMF > SMF Coding Discussion

How to create Scheduled Tasks in SMF 2.0

<< < (4/6) > >>

Arantor:
Sure it is. Once every 12 hours - regularity 12, time unit h.

Mick.:

--- Quote from: Arantor on May 05, 2010, 01:05:49 PM ---Sure it is. Once every 12 hours - regularity 12, time unit h.

--- End quote ---

Excellent.

The idea is,......  see, i have the member currently online set to 60 minutes.  ...and, in the language file i changed: "Users active in past 60 minutes" to "Users online".... and changed in "features and option" the time threshold from 60 to 360.

Now it shows a lot more users online.   But late at night like most forums, activity is not great.  That's where the scheduled task comes in.  At whatever time set, say, midnight it will revert from 360 mins to 60 mins.   ....and maybe a clear cache with it.

Then in the morning say at 6am, it will revert from 60 mins to 360 mins again.

That's why asked if the schedule task can be a key player here.

Arantor:
Sure, in that case you create two tasks, each to run daily.

Then you just set one to run at midnight, and one to run at 6am - since the time a task is run is configurable in the ACP (and isn't related to this tutorial directly)

Mick.:

--- Quote from: Arantor on May 05, 2010, 01:34:37 PM ---Sure, in that case you create two tasks, each to run daily.

Then you just set one to run at midnight, and one to run at 6am - since the time a task is run is configurable in the ACP (and isn't related to this tutorial directly)

--- End quote ---

I didnt mean to thread-jack ;)

Thanx Arantor, that cleared my questions.

Arantor:
Well, it's relevant - how to use scheduled tasks in a slightly different way, it's all good :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version