I’m afraid it is not possible. To run a job every N minutes, N has to go into 60 minutes’ interval even number of times. For example, you can set every 2, 3, 4, 5, 6, 10, 12, 15, 20 or 30 minutes but not 42.
In other words, the following condition has to be true, 60 % N == 0.
As as compromise, to run the workflow every 40 minutes (quite close to every 42 minutes), you could use the following three conditions alongside:
- Run at 40th minute of each 3rd hour starting from midnight
- Run at 20th minute of every 3rd hour starting from 1 AM
- Run at 0 minute of every 3rd hour starting from 2 AM
I think this could be achieved with the following three custom cron expressions:
0 40 */3 * * *
0 20 1/3 * * *
0 0 2/3 * * *