def scheduler_init (parent):

    # Define the jobs to run at which intervals
    schedule.every().minute.do(Reminder.run_remind_once)
    schedule.every().minute.do(Reminder.run_remind_recurring)

    # Start the main thread, polling the schedules
    # every second
    while True:

        # Check if the current parent pid matches the original
        # parent that started us. If not, we should end.
        if os.getppid() != parent:
            logger.error(
                'Killing scheduler as it has become detached from parent PID.')

            sys.exit(1)

        # Run the schedule
        schedule.run_pending()
        time.sleep(1)

    return
Schedule Init
dataset/ETHPy150Open leonjza/hogar/hogar/Utils/Scheduler.py/scheduler_init