Exemple #1
0
def main():
    start, end, timechunk = tools.parse_argv_time()
    if start is None or end is None:
        end = dt.datetime.now()
        start = end - relativedelta(hours=1, minutes=5)
    if not timechunk:
        timechunk = (0, 1, 0, 0)

    chunks = tools.generate_task(start, end, *timechunk)

    for t0, t1 in chunks:
        print(t0, t1)
        sync(t0, t1)
def main():
    start, end, timechunk = tools.parse_argv_time()
    if start is None or end is None:
        end = dt.datetime.now()
        start = end - relativedelta(hours=3, minutes=5, days=91)

        end = arrow.now().datetime
        start = arrow.get("2017-07-07 16:10:14").datetime
    if not timechunk:
        timechunk = (0, 2, 0, 0)

    chunks = tools.generate_task(start, end, *timechunk)

    for t0, t1 in chunks[::-1]:
        print(t0, t1)
        sync(t0, t1)