(root, scheduler_bool, hour_of_day, string_var, progress_var, current_time_text, twitter_state)
The scheduler that users can use to have social amnesia wipe
    tweets/favorites at a set point in time, repeatedly.
    :param root: tkinkter window
    :param scheduler_bool: true if set to run, false otherwise
    :param hour_of_day: int 0-23, sets hour of day to run on
    :param string_var, progress_var - empty Vars needed to run the deletion functions
    :param current_time_text: The UI text saying "currently set to TIME"
    :param twitter_state: dictionary holding twitter settings
    :return: none
The scheduler that users can use to have social amnesia wipe
    tweets/favorites at a set point in time, repeatedly.
    :param root: tkinkter window
    :param scheduler_bool: true if set to run, false otherwise
    :param hour_of_day: int 0-23, sets hour of day to run on
    :param string_var, progress_var - empty Vars needed to run the deletion functions
    :param current_time_text: The UI text saying "currently set to TIME"
    :param twitter_state: dictionary holding twitter settings
    :return: none
The scheduler that users can use to have social amnesia wipe tweets / favorites at a set point in time repeatedly . : param root : tkinkter window : param scheduler_bool : true if set to run false otherwise : param hour_of_day : int 0 - 23 sets hour of day to run on : param string_var progress_var - empty Vars needed to run the deletion functions : param current_time_text : The UI text saying currently set to TIME : param twitter_state : dictionary holding twitter settings : return : none
def set_twitter_scheduler(root, scheduler_bool, hour_of_day, string_var, progress_var, current_time_text, twitter_state):
    """
    The scheduler that users can use to have social amnesia wipe
    tweets/favorites at a set point in time, repeatedly.
    :param root: tkinkter window
    :param scheduler_bool: true if set to run, false otherwise
    :param hour_of_day: int 0-23, sets hour of day to run on
    :param string_var, progress_var - empty Vars needed to run the deletion functions
    :param current_time_text: The UI text saying "currently set to TIME"
    :param twitter_state: dictionary holding twitter settings
    :return: none
    """
    twitter_state['scheduler_bool'] = scheduler_bool.get()
    twitter_state.sync

    global already_ran_bool
    if not scheduler_bool.get():
        already_ran_bool = False
        return

    twitter_state['scheduled_time'] = hour_of_day
    twitter_state.sync

    current_time_text.set(f'Currently set to: {hour_of_day}')

    current_time = datetime.now().time().hour

    if current_time == hour_of_day and not already_ran_bool:
        messagebox.showinfo(
            'Scheduler', 'Social Amnesia is now erasing your past on twitter.')

        delete_twitter_tweets(
            root, string_var, progress_var, string_var, twitter_state, True)
        delete_twitter_favorites(
            root, string_var, progress_var, string_var, twitter_state, True)

        already_ran_bool = True
    if current_time < 23 and current_time == hour_of_day + 1:
        already_ran_bool = False
    elif current_time == 0:
        already_ran_bool = False

    root.after(1000, lambda: set_twitter_scheduler(
        root, scheduler_bool, hour_of_day, string_var, progress_var, current_time_text, twitter_state))
def set_twitter_scheduler ( root , scheduler_bool , hour_of_day , string_var , progress_var , current_time_text , twitter_state ) : twitter_state [ 'scheduler_bool' ] = scheduler_bool . get ( ) twitter_state . sync global already_ran_bool if not scheduler_bool . get ( ) : already_ran_bool = False return twitter_state [ 'scheduled_time' ] = hour_of_day twitter_state . sync current_time_text . set ( f'Currently set to: {hour_of_day}' ) current_time = datetime . now ( ) . time ( ) . hour if current_time == hour_of_day and not already_ran_bool : messagebox . showinfo ( 'Scheduler' , 'Social Amnesia is now erasing your past on twitter.' ) delete_twitter_tweets ( root , string_var , progress_var , string_var , twitter_state , True ) delete_twitter_favorites ( root , string_var , progress_var , string_var , twitter_state , True ) already_ran_bool = True if current_time < 23 and current_time == hour_of_day + 1 : already_ran_bool = False elif current_time == 0 : already_ran_bool = False root . after ( 1000 , lambda : set_twitter_scheduler ( root , scheduler_bool , hour_of_day , string_var , progress_var , current_time_text , twitter_state ) )