Question

Photo of Long Pham

0

Workflow Job won't run automatically

Hi,

I've configured a 'Launch Workflow' job to run every hour (cron expression - 0 0 0/1 1/1 * ? *) and it is active.  It will run to completion when I manually click the play icon but it won't run automatically every hour.  There is another job in the system called Sync Media that is running according to schedule so the Job Pulse process seems to be running fine.  The workflow action is a simple SQL select statement.  Is there any other settings I should be looking at ?  Thanks.

  • Photo of Leah Jennings

    0

    Hmm, fascinating. I did test a job that launches a workflow on our system (running v13.3) with the following hourly cron expression and it did work:

    0 0 0/1 1/1 * ? *

    This may be a better conversation to have over in Rocket.Chat in the #troubleshooting channel just so that way it's more real-time communication, and others could help chime in if I'm missing anything.

  • Photo of Leah Jennings

    0

    Hi @Long! I copied/pasted your cron expression into crontab.guru and it's showing invalid. Their example for every hour is the following:

    0 * * * *

    Can you try that as your cron expression instead and see if that resolves anything?

  • Photo of Long Pham

    0

    Thanks Leah.  I used CronMaker - http://www.cronmaker.com/?0 - to get the expression.  I tried using yours for the job and it still doesn't auto start.  I deleted the old job and created a new one with your expression and that doesn't auto start either.  Just to confirm, I don't have to click on the play icon to start the job correct ?  Once I create the job, and it is active, it should auto start ?  Thanks.

  • Photo of Leah Jennings

    0

    Correct. The expression I gave you starts the job every hour at the top of the hour, so it will start at 5p ET if you set it as active now. If that still isn't working for you, can you share a screenshot of your job configuration?

  • Photo of Long Pham

    0

    Screen_Shot_2022-05-24_at_3.10.39_PM.png

  • Photo of Leah Jennings

    0

    Hmm. And how are you confirming that is hasn't been running successfully?

  • Photo of Long Pham

    0

    In the job history, I see the last time it was run was when I ran it manually.  There are no other entries.

    I added this job on the production server and looks like it did try to run hourly, but now I get a different error message:

    Error scheduling the job: Test PJS Flow.

    Unexpected end of expression.

    If I run this job manually, it runs successfully.   See the attached screenshot of the job setup:

    Screen_Shot_2022-05-26_at_2.58.00_PM.png

  • Photo of Long Pham

    0

    Just another update, I looked at the job history this morning and it showed the last successful run was yesterday at 1PM (when it was run manually), and an entry at 4AM this morning, with the error:

    Error loading the job: Test PJS Flow.

    Unexpected end of expression.

    The job is scheduled to run every hour, so why did it only tried at 4am ?

  • Photo of Long Pham

    0

    I changed the cron expression to your example - 0 0 0/1 1/1 * ? * - and now it is working !

    So to sum up, looks like the job processes in the sandbox environment may not be running properly because if I replicate this in sandbox, it still won't run, but the production environment has been running properly every hour.

    Thanks for your help.