示例#1
0
def supervision_task():
    now = datetime.datetime.utcnow()
    last_business_day = get_business_day_of_month(month=now.month,
                                                  year=now.year,
                                                  count=-1)
    if now.day == last_business_day.day:
        send_for_all_domains(last_business_day, send_supervision_reminder)
示例#2
0
def first_soh_task():
    now = datetime.utcnow()
    last_business_day = get_business_day_of_month(month=now.month,
                                                  year=now.year,
                                                  count=-1)
    if now.day == last_business_day.day:
        send_for_all_domains(last_business_day, SOHReminder)
示例#3
0
def stockout_reminder_task():
    """
        6th business day of month
    """
    now = datetime.utcnow()
    last_business_day = get_business_day_of_month(month=now.month, year=now.year, count=6)
    if now.day != last_business_day.day:
        return

    send_for_all_domains(last_business_day, StockoutReminder)
示例#4
0
def stockout_reminder_task():
    """
        6th business day of month
    """
    now = datetime.utcnow()
    last_business_day = get_business_day_of_month(month=now.month, year=now.year, count=6)
    if now.day != last_business_day.day:
        return

    send_for_all_domains(last_business_day, StockoutReminder)
示例#5
0
def third_soh_task():
    now = datetime.utcnow()
    last_month_last_day, fifth_business_day = get_last_and_nth_business_day(
        now, 5)
    if now.day == fifth_business_day.day:
        send_for_all_domains(last_month_last_day, SOHReminder)
示例#6
0
def third_soh_task():
    now = datetime.datetime.utcnow()
    last_month_last_day, fifth_business_day = get_last_and_nth_business_day(now, 5)
    if now.day == fifth_business_day.day:
        send_for_all_domains(last_month_last_day, send_soh_reminder)
示例#7
0
def first_soh_task():
    now = datetime.datetime.utcnow()
    last_business_day = get_business_day_of_month(month=now.month, year=now.year, count=-1)
    if now.day == last_business_day.day:
        send_for_all_domains(last_business_day, send_soh_reminder)
示例#8
0
def second_soh_task():
    now = datetime.datetime.utcnow()
    last_month_last_day, first_business_day = get_last_and_nth_business_day(now, 1)
    if now.day == first_business_day.day:
        send_for_all_domains(last_month_last_day, send_soh_reminder)
示例#9
0
def second_soh_task():
    now = datetime.utcnow()
    last_month_last_day, first_business_day = get_last_and_nth_business_day(now, 1)
    if now.day == first_business_day.day:
        send_for_all_domains(last_month_last_day, SOHReminder)
示例#10
0
def supervision_task():
    now = datetime.utcnow()
    last_business_day = get_business_day_of_month(month=now.month, year=now.year, count=-1)
    if now.day == last_business_day.day:
        send_for_all_domains(last_business_day, SupervisionReminder)