how to run drupal aggregator outside cron.php?

751 views Asked by At


i am using aggregator core module in drupal and i need to schedule it in crontab but outside cron.php i tried wget http://mywebsite.com/admin/content/aggregator/update/1
i got 403 forbidden error
i tried curl as well and it returns this as html part

  You are not authorized to access this page

although i have set the permission of this module to anonymous users!!

any idea is highly appreciated Thanks

3

There are 3 answers

0
Alaa On BEST ANSWER

Thanks All for your help!! i solved my problem by scheduling the following code as a cron and thus it runs aggregator cron as i want:

<?php
require_once '/var/www/htdocs/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
module_invoke('aggregator','cron');
?>
1
sultan On
0
Berdir On

There are alternatives to the default cron which runs all cron implementations, for example Elysia Cron, see kbahey's blog post about it.

At least that's what I assume you want to do, run it more or less often than the other cron implementations.