MyBB Community Forums

Full Version: Can I use task manager as cron job?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a file on my other domain that  needs cron job but my hosting doesn't have it! How can I use mybb task manager to open/execute some external URL?
You need the file that has the code to be executed in the /inc/tasks folder. You then can go to the Admin CP and create a new task for it.
Thanks buddy! One question!


Can I simply add to my task file:

<?php
header("Location: http://www.example.com/cron/run.php");
exit;
?>

will this open the URL?

What do you recommend?
Buddy what should I put there?
Put the actual code there in a task function.
<?php

function task_enterthenameofilespecifiedinacphere($task)
{
//code
}
Thanks buddy D666 happy new year by the way Smile
remember that this isn't a true cron job. it will only run the first page view after the expected run time. So it is dependent on your site's traffic. Also, there is (or was) a hard coded limit of 5 minutes between task runs, regardless of the setting for the task itself.