skip to Main Content

I have magento2 website.I have crontab configured for running the daily crons.How i can verify the indexing cron is running daily.

Also how i can check the current running crons

Thanks in advance

3

Answers


  1. You can watch result of cron work in db, table: cron_schedule.

    Login or Signup to reply.
  2. To check the configured cron jobs you can use the command crontab -l in your terminal and you will see the cron jobs configured and the time they will run.

    Based on the cron jobs configured, you can view the status of cron jobs(missed, pending or success) in the cron_schedule table.

    Connect to your database and run sql query select * from cron_schedule; to see the jobs.

    In the cron_schedule table following fields are present:

    schedule_id: Atuto-increment id.

    job_code: code of the cron job. This is defined as job_id=”xyz” in any module’s etc/crontab.xml file.

    status: Specifies the current status of this job (misssed/pending/success).
    message: Message of this job.

    created_at: Specifies the time when entry was made in the table cron_schedule for this job.

    scheduled_at: Specifies the time when this cron job should run.

    executed_at: Specifies the time when the execution of this cron job started.

    finished_at: Specifies the time when execution of this cron job finished.

    Login or Signup to reply.
  3. try this on SQL

    select * from cron_schedule WHERE status='running'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search