Developer's Cron Job Double-Fired Orders Due to Two Self-Inflicted Mistakes
A developer running automated trading scripts on a home Mac Mini discovered that identical orders were being placed twice, resulting in double or triple the intended exchange positions. Investigation revealed two separate causes: in the first case, a buffered Python script appeared silent and unresponsive, leading the developer to restart it while the original was still running. In the second incident, a manual script execution coincidentally overlapped with the scheduler firing at the same minute, creating two simultaneous instances with no coordination. Neither the scheduler nor the exchange API was at fault — both errors stemmed from the developer's own actions and assumptions. The postmortem led to simple preventive rules: always check the process table before restarting a silent job, and never schedule manual runs on the same minute as automated ones.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in