|
@@ -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():
|