Docker Deployment - Automatic Start of Workflow

Hi all!

We are trying to deploy n8n via a dockerfile. Afterwards we call:

npx n8n import:workflow --input=/test.json
npx n8n update:workflow --all --active=true

Import and activation are successful. But afterwards the CRON job of the imported workflow doesn’t function as it should. (Every minute we execute an http call.)

Any ideas, why the routine of the CRON element isn’t working?

Many thanks in advance! If more files are needed, we will gladely upload any :slight_smile:

Best regards
Pepe

Welcome to the community @pepeb!

The reason is probably that those are different processes. There is the main n8n process and the import n8n process. If you run them in parallel the main process will not be aware that the workflows are now supposed to be active as all what the other process does is to activate them in the database. So what you have to do, is to restart the main process or do not start the main process till the import and activation is done.