Reputation: 789
I use a cron job to return orders from an Amazon account and it was working fine since 2~3 weeks. Indeed, there are more orders than usual (due to the pre-Christmas period) and it looks like the cron task can't get all orders.
So I decided to schedule it differently to stop missing some of the orders. Now the cron job runs every hour (instead every two hours) and I applied new DateTime('-5 hours', new DateTimeZone('UTC'));
to the CreatedAfter requested parameter (before, it was specified as -10 hours).
I had to manually run the cron job to return missing orders which are visible on the amazon interface as "unshipped" and client informations are fully completed.
$start_date = new DateTime('2012-04-12 10:30:00', new DateTimeZone('UTC'));
$request->setCreatedAfter($start_date);
$end_date = new DateTime('2012-04-12 11:30:00', new DateTimeZone('UTC'));
$request->setCreatedBefore($end_date);
Can you tell me why it is still missing some of the orders? Please ask if you more information or code.
Upvotes: 3
Views: 1368
Reputation: 4096
A couple of thoughts:
Upvotes: 5