Skip to content

cronjob tasks defined within 'default' group are not properly running  #2672

Closed
@markshust

Description

@markshust

I'm trying to define a cronjob for a custom module but noticing some issues:

  • It seems that third-party cronjobs are only scheduled once, when the cache is flushed. When the scheduled ./bin/magento cron:run runs every minute, the first time the cache is flushed it picks up all of the third-party module cronjobs, and runs them on the next execution.
  • After the first run, it doesn't seem as though these third-party modules are scheduled for a second run, ever. Until the cache is flushed again.
    • Is this perhaps related to cron group? I noticed that items in the default cron group never get rescheduled, but it seems that items in the index cron group do (at least items from core code).
    • Disabling the cache doesn't help.
    • Even if cache is disabled, the third-party modules never get registered.
    • Even if cache is disabled, iff a ./bin/magento cache:flush is run, all of the items in the default group do get scheduled. This leads me to believe that either that cache is not getting properly disabled, there is a bug in the caching system, and/or there is some sort of intricacy with how the cache actually works.
  • What is the purpose of running php update/cron.php if we are already running ./bin/magento cron:run, and what is the difference between the two? I'm pulling info from devdocs http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html#config-cli-cron-bkg

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions