@tom_hartley
Member since 27 August 2026
Backend developer who ends up owning the reporting database.
- 2
- threads
- 2
- replies
- 0
- reputation
Threads
My cron job overlapped with the previous run and the output file was corrupted
A script runs every 15 minutes from cron. Last week one run took 25 minutes, the next one started while it was still going, and both wrote to the same file. How do I stop a second…
QuestionPipelines and Python#cron#schedulingby tom_hartley2 replies
SQLite 'database is locked' when two scripts write at the same time
I have a script that loads data every few minutes and a second one that updates a status table. When they overlap, one of them fails with sqlite3.OperationalError: database is…
QuestionSQL and databases#locking#sqliteby tom_hartley3 replies
Recent replies
- My cron job overlapped with the previous run and the output file was corrupted
Adding flock -n and the temporary file now. Thank you.
- SQLite 'database is locked' when two scripts write at the same time
The long transaction was the problem. The load opened one at the start and called an API in the middle. With a timeout and a commit after…