0

有人知道(drupal 6)是否可以创建几个应该由 crontab 运行的任务?我已经创建了 hook mymodule_cron 但我还需要一个。是否可以创建类似 mymodule_another_task_cron 的东西?

谢谢

4

2 回答 2

0

I can highly recommend the Elysia Cron module

Elysia Cron extends Drupal standard cron, allowing a fine grain control over each task and several ways to add custom cron jobs to your site.

As a module developer the method you'll be most interested in is implementing hook_cronapi() to register jobs that can be scheduled individually through the Elysia cron admin settings.

There's also Ultimate Cron, but I can't vouch for that one as I've never used it.

于 2013-02-20T14:54:29.830 回答
0

Why don't you add another task in your existing hook_cron? You can call whatever functions you want from one hook_cron.

于 2013-02-20T14:24:52.000 回答