Jump to the post that solved this thread.
Solved: 6 Years, 6 Months, 1 Week ago Can I use task manager as cron job?
#1
Solved: 6 Years, 6 Months, 1 Week ago
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?
Reply
#2
Solved: 6 Years, 6 Months, 1 Week ago
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.
Reply
#3
Solved: 6 Years, 6 Months, 1 Week ago
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?
Reply
#4
Solved: 6 Years, 6 Months, 1 Week ago
Buddy what should I put there?
Reply
#5
Solved: 6 Years, 6 Months, 1 Week ago
Put the actual code there in a task function.
<?php

function task_enterthenameofilespecifiedinacphere($task)
{
//code
}
Reply
#6
Solved: 6 Years, 6 Months, 1 Week ago
Thanks buddy D666 happy new year by the way Smile
Reply
#7
Solved: 6 Years, 6 Months, 1 Week ago
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.
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)