Scheduled pulse is not sending with QuartzScheduler error

I noticed pulse has stopped working ever since upgrading to version 0.43.4. Upon googling, I saw that restarting the metabase instance could work so I tried it but pulse scheduled email is still not sent. I noticed in the logs there's this error after the instance restart.

INFO org.quartz.impl.jdbcjobstore.JobStoreTX Handling 1 trigger(s) that missed their scheduled fire-time.
 2022-11-17T01:31:17+08:00 ERROR org.quartz.core.ErrorLogger An error occurred while scanning for the next triggers to fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: ERROR: column "sched_time" of relation "qrtz_fired_triggers" does not exist
ERROR org.quartz.core.ErrorLogger An error occurred while scanning for the next triggers to fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: ERROR: column "sched_time" of relation "qrtz_fired_triggers" does not exist
  Position: 112 [See nested exception: org.postgresql.util.PSQLException: ERROR: column "sched_time" of relation "qrtz_fired_triggers" does not exist
  Position: 112]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2923)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2805)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2803)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2802)
	at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:287)
Caused by: org.postgresql.util.PSQLException: ERROR: column "sched_time" of relation "qrtz_fired_triggers" does not exist
  Position: 112
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:166)
	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:134)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:1502)
	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.insertFiredTrigger(StdJDBCDelegate.java:2666)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2906)
	... 5 more

I assume it's related to pulse scheduler as it is used for metabase jobs. If the error is related, what could've caused this and what would be the solution? Thanks for your help. Any input is appreciated.

diagnostic info:

{
  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.15+10",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.15",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.15+10",
    "os.name": "Linux",
    "os.version": "4.14.294-220.533.amzn2.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
  },
  "metabase-info": {
    "databases": [
      "postgres"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "12.11"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.3.2"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2022-06-27",
      "tag": "v0.43.4",
      "branch": "release-x.43.x",
      "hash": "61cc28e"
    },
    "settings": {
      "report-timezone": "Asia/Kuala_Lumpur"
    }
  }
}

pulse trigger job after restart:

Hi @fatin
I have never seen the errors you are seeing in the logs before, so it seems like there's some corruption in your application database, but you are hitting this issue:
https://github.com/metabase/metabase/issues/10088 - upvote by clicking :+1: on the first post

Thanks for the reply, flamber. We suspect some things were missed when we upgraded metabase, causing mismatch between the quartz scheduler version and database. Appreciate the github issue link. Will have a look at it. In the mean time, we'll try to see if we can run the migration script so that the database matches the criteria of the current quartz scheduler version.

Can confirm it was because some steps were missed during upgrade and migration. Fixed by dropping qrtz related tables and creating them again. Pulse works now