2013-06-26 03:32
浏览 32

如何在Linux中激活Drupal Cron任务?

In Linux, we use crontab to run automations. So far i know only that system cron can make automated tasks. Now i found out Drupal has the Crons also. But, the Drupal whatever is a bundle of script itself only.

I so far realized there is no way to make a PHP script to be up & running itself, without System Cron. And also it should not be.

  • So how does Drupal Cron get activated unless their tasks are registered in Linux/System crontab ?
  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dshyu6866 2013-06-26 04:05

    Drupal cron is more of a psuedo-cron. It doesn't utilize the system crontab, or anything like that. Rather, it runs during the bootstrap process.

    If your cron is set to 3 hours, for example, the bootstrap process (everytime you visit a Drupal page) will check to see if it's time to run the cron. If the time is >= 3 hours, the cron tasks will run.

    This means that the cron runs are dependent on the visits your site gets. If no one is visiting your site, then the cron will not run.

    解决 无用
    打赏 举报

相关推荐 更多相似问题