Error when running cron task

Hi, i have custom doctype. Doctype is working correctly. I have also custom cron task, which seems to run correctly in most of times. But sometimes i can see following
in worker.error.log:

 File "/home/frappe/frappe-bench/apps/frappe/frappe/database/", line 865, in get_table_columns
    raise self.TableMissingError('DocType', doctype)
pymysql.err.ProgrammingError: ('DocType', 'Planned Email')

So i was trying go to database through bench command. “bench mariadb” and i run command “show tables” and i was looking for “tabPlanned Email” table. But I can’t see it here.

When I opened database of this site, table is there and data are inside.

Doctype is working fine from admin.

Can you help me? Is there way how can i repair schema table?

Maybe you have multiple sites on your bench and custom doctype is only present on one site :smile:

How did you add this cron job?


thanks for answer, you are half right…i tried run bench mariadb with --site parameter, and now i can see my table here.

But in error log there is still same error.

I am running cron with line in of my custom app:

scheduler_events = {
		"*/5 * * * *": [