Hacker News new | ask | show | jobs
by bgdkbtv 1434 days ago
What about scheduled jobs (cron), email notifications, database etc?
1 comments

My server's binary is more than a server, it can execute one off tasks, etc. For example I can execute the server binary with special arguments, ex "server --task admin-reports" in a cron job.

For the database I use Postgresql with the standard library's database/sql package (using lib/pq as the driver).

For scheduled emails and tasks, I store them in Postgres and I have a task that is run through my server binary every few hours (ex: "server --task scheduled-tasks").