Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting up crontab #1

Open
eshellman opened this issue Jun 13, 2018 · 5 comments
Open

setting up crontab #1

eshellman opened this issue Jun 13, 2018 · 5 comments
Assignees

Comments

@eshellman
Copy link
Contributor

@jekohk , @rdhyee I'm now building new Unglue.it machines using John's playbooks, and I've begun the process of cleaning out Raymond's equivalents. (see Gluejar/regluit:more-cleanup) One thing that seems to be missing from John's scripts is a crontab setup, which in Raymond's system are used only to run emit_notices.sh once a minute and to restart the server on reboot. Have I missed anything in John's work (now moved here)?

@eshellman
Copy link
Contributor Author

Also, why was emit_notices being done by cron instead of celerybeat?

@rdhyee
Copy link

rdhyee commented Jun 18, 2018

IIRC, I resorted to cron because I couldn't get celery beat to work in this case. I can't recall the details. I can dig further if you want @eshellman

@eshellman
Copy link
Contributor Author

thanks raymond. what about the startup?

@eshellman
Copy link
Contributor Author

emit notices no longer needed. remaining question is whether something is needed so reboot restarts the server

@rdhyee
Copy link

rdhyee commented Jun 21, 2018

@eshellman One thing that needed to be addressed on reboot is setting up /var/run/celery (/var/run is deleted on reboot.) That's why I had in regluit/crontab_prod.txt (and the other crontabs):

@reboot sudo mkdir /var/run/celery; sudo chown celery:celery /var/log/celery /var/run/celery; cd /opt/regluit; . /opt/regluit/ENV/bin/activate; /opt/regluit/ENV/bin/django-admin.py celeryd_multi restart w1 --settings=regluit.settings.prod; /etc/init.d/celerybeat restart;

Note the first part

@reboot sudo mkdir /var/run/celery; sudo chown celery:celery /var/log/celery /var/run/celery

I don't know whether re-creating /var/run/celery, etc is still relevant in the new setup -- but that's something to check.

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

No branches or pull requests

3 participants