Closed tanase-sebastian closed 5 years ago
you can try fixing it this way:
jc.later.date.localTime();
Hello,
Thanks for the reply. The issue did not occur again after using delay(), but if it ever comes up again I will try your solution. Thanks.
Hello,
I was trying to create jobs using with delay(1000), so that they will run immediatly. However, what happened is that the 'after' field was set to about 41 minutes in the future, instead of 1 second. This happened all of a sudden, while previous job scheduling worked fine; I did not restart meteor nor did I change the system date in between.
What's more, in the logs, the 'Constructed' message is set at the wrong time whereas the 'Job submitted' is set at the correct time.
I attached a screenshot of the Job data in the DB. As you can see the 'created' field is set to '2018-04-13 16:45:32.421' and the 'after' field is set to '2018-04-13 17:27:18.300' when it should have been set to something like '2018-04-13 16:45:34.000'.
For now, I think I will use after() instead of delay() and calculate the date myself.