Scheduled tasks not running after database conversion

Hello:

I have a v7.2 application that was running on an Oracle database. I have copied everything over to a PostgreSQL database and am running the application there now. Everything is working except scheduled tasks. Nothing is being scheduled. Specifically the email queue process.

It was all working before, so I’ve messed something up in the translation process.

I have cuba.schedulingActive = true. I have a scheduled task for cuba_Emailer.processQueuedEmails configured under the admin username. I am able to send a test email successfully, so the SMTP settings are correct.

My emails stay in “Queued” state. I have set “log start” and “log end” on the emailer. Nothing is showing in the execution logs.

I have this in my app.log file:

2020-09-09 21:45:17.150 INFO  [main] com.haulmont.cuba.core.sys.CubaThreadPoolTaskScheduler - Initializing ExecutorService 'scheduler'

Where do I look to get this running?

Screen shots follow:

image

image

image

image

Hi,

  1. Your last screenshot from psql console is from different database, not the same you are using for other CUBA application screenshots.
    In the black screenshot - period is NULL for all 4 rows.
    In the CUBA screenshot period is set to 10 and 30 seconds.

  2. You can view whether the scheduled task is being executed at all by:

  • Enabling both checkboxes Log start, Log finish in the task editor
  • Pressing Execution History in the task browser.
  1. I’d also recommend you to set Timeout for all tasks. It used to help in some cases in my experience.
    E.g. set it to 3600 seconds.

Thank you! I still can’t figure out why the screen doesn’t match the database. I confirmed that I used the correct username/password/schema setting in the URL.

Anyway, I did an update statement in my command line and it is now working.