Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

user cron job - kill reminder #109

Open
4 tasks
cataclysmic opened this issue Aug 9, 2017 · 0 comments
Open
4 tasks

user cron job - kill reminder #109

cataclysmic opened this issue Aug 9, 2017 · 0 comments
Assignees

Comments

@cataclysmic
Copy link
Collaborator

cataclysmic commented Aug 9, 2017

Check oTree instance for last worker action and send notification mail to user after long (48h) inactivity to close oTree.

  • create local cronjob on user_add ~ 1.00am
  • check if otree is active
    kill $(ps -axo user:20,pid,command | grep $USER | grep 'otree' | grep 'python' | awk '{if (NR==1) print $(2)}')
  • query database for last user every 24h
  • if last user activity > 48h, send reminder to experimenter to kill otree

Needs one script and one crontab entry.

User-specific cronjob:
https://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job#2369

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants