cron scripts
parent
53e3f655c6
commit
3e0b3fbc93
|
@ -130,7 +130,7 @@ def load_doab_oai(from_date, until_date, limit=100):
|
|||
from_ = from_date
|
||||
else:
|
||||
# last 15 days
|
||||
from_ = datetime.datetime.now(pytz.UTC) - datetime.timedelta(days=15)
|
||||
from_ = datetime.datetime.now() - datetime.timedelta(days=7)
|
||||
num_doabs = 0
|
||||
new_doabs = 0
|
||||
lasttime = datetime.datetime(2000, 1, 1)
|
||||
|
|
|
@ -17,7 +17,7 @@ class Command(BaseCommand):
|
|||
default=None, help="YYYY-MM-DD to start")
|
||||
parser.add_argument('--until', nargs='?', type=timefromiso,
|
||||
default=None, help="YYYY-MM-DD to end")
|
||||
parser.add_argument('--max', nargs='?', type=int, default=None, help="max desired records")
|
||||
parser.add_argument('--max', nargs='?', type=int, default=1000, help="max desired records")
|
||||
|
||||
def handle(self, from_date, **options):
|
||||
until_date = options['until']
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
|
||||
cd /home/ubuntu/doab-check
|
||||
/home/ubuntu/.local/bin/pipenv run python manage.py check_items >> cron_check.log
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
|
||||
cd /home/ubuntu/doab-check
|
||||
/home/ubuntu/.local/bin/pipenv run python manage.py load_doab >> logs/cron_load.log
|
Loading…
Reference in New Issue