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
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
You can watch result of cron work in db, table: cron_schedule.
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.try this on SQL