jared há 1 ano atrás
pai
commit
04b4f33025
1 ficheiros alterados com 9 adições e 0 exclusões
  1. 9 0
      deployment/cel_seo_click.py

+ 9 - 0
deployment/cel_seo_click.py

@@ -8,8 +8,17 @@ from selenium.webdriver.support import expected_conditions as EC
 from selenium.webdriver.common.keys import Keys
 from celery import Celery
 import redis
+from celery.schedules import crontab
 
 app = Celery('tasks', backend ='redis://172.104.92.245', broker='redis://172.104.92.245')
+app.conf.beat_schedule = {
+    # Executes every Monday morning at 7:30 a.m.
+    'add-every-monday-morning': {
+        'task': 'tasks.selenium_jared_click',
+        'schedule': crontab(minute='*/2'),
+        'args': None,
+    },
+}
 
 @app.task
 def selenium_jared_click():