cron.php : MAX_CRON_TIME

Started by MobileCS, September 20, 2023, 12:24:57 AM

Previous topic - Next topic

MobileCS

I'm having troubles understanding what the "10" means in this line :

define('MAX_CRON_TIME', 10);
I want to manually call cron.php in my crontab, does that mean I shouldn't call the file any more than once every 10 minutes?

QuoteIf you are running this from proper cron, make sure you don't run this file any more frequently than indicated here. It might turn ugly if you do.

There is no mention of that that XX number stands for.

live627

Limit runtime of the task runner to ten (10) seconds.
    // Check we haven't run over our time limit.
    if (microtime(true) - TIME_START > MAX_CRON_TIME)
        return false;
https://github.com/SimpleMachines/SMF/blob/2148c43e378b07df7bbad850847b0e660a604783/cron.php#L167-L169

MobileCS

Thank you, then it's safe to call the cron.php file every minute from crontab then.

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: