Run a Change Role Cron Job on WordPress via cPanel

Managed to find the solution.

My finished code is:

register_activation_hook ( __FILE__, 'cron_job' );

function cron_job() 
{
wp_schedule_event( time(), 'hourly', 'hourly_job' );
}

add_action( 'hourly_job', 'cron_job_task' );

function cron_job_task () 
{
    $users = get_users(
        array(
            'fields' => array( 'ID', 'user_registered' ),
            'role'   => 'coaching',
        )
    );

    foreach ( $users as $user ) {
        $time = $user->user_registered;
        if(strtotime($time) < strtotime('-3 months')) {
            $u = new WP_User( $user->ID );
            $u->remove_role( 'coaching' );
            $u->add_role( 'platinum' );
        }
    }
}
?>

With a cPanel cron job set hourly.