Skip to content

Instantly share code, notes, and snippets.

@icook
Last active May 10, 2018 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icook/296184ce6ae665b0479d71c055f3d16b to your computer and use it in GitHub Desktop.
Save icook/296184ce6ae665b0479d71c055f3d16b to your computer and use it in GitHub Desktop.
0,15,30,45 * * * * /home/scm/task.sh compress_slices
* * * * * /home/scm/task.sh generate_credits -ds
#1 */4 * * * /home/scm/task.sh create_trade_req buy
#1 */4 * * * /home/scm/task.sh create_trade_req sell
* * * * * /home/scm/task.sh collect_minutes
* * * * * /home/scm/task.sh collect_ppagent_data
*/5 * * * * /home/scm/task.sh compress_minute
2 * * * * /home/scm/task.sh compress_five_minute
*/2 * * * * /home/scm/task.sh update_block_state
*/5 * * * * /home/scm/task.sh update_online_workers
*/15 * * * * /home/scm/task.sh cache_user_donation
* * * * * /home/scm/task.sh update_network
* * * * * /home/scm/task.sh server_status
*/5 * * * * /home/scm/task.sh leaderboard
*/3 * * * * /home/scm/task.sh cache_profitability
0 0,8,16 * * * /home/scm/task.sh create_payouts
#!/bin/bash
export SIMPLECOIN_CONFIG=/home/scm/simplecoin_multi/config.toml
# The flock prevents concurrently running two instances of the same task. The tasks _should_ be concurrent safe, but it's not well tested
# systemd cat is how we log the results, but you could pipe append them to a standard log file as well
/usr/bin/flock -w 0 /tmp/simplecoin_$1.lock /home/scm/simplecoin_multi/venv/bin/python /home/scm/simplecoin_multi/manage.py scheduler $@ | systemd-cat -t $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment