This variant is set up in a batch job. I have examples of the deliveries creating 7 days ahead of time and example of ones that don't
May be you can try with the one which goes correctly and compare the same with one which is not going by executing in foreground. I think, by this way, you will find some clue
G. Lakshmipathi