To schedule one-time tasks in WordPress follow these steps:
1. Determine the Time: Calculate the future timestamp for when you want the task to run.
2. Define the Hook: Choose a unique action hook name that will trigger your task.
3. Create the Function: Write the function that will execute when the event is triggered.
4. Schedule the Event: Use wp_schedule_single_event to schedule the event with the calculated timestamp, hook and any arguments.

//Step 1: Calculate the future timestamp.
$timestamp = time() + 3600; // 1 hour in second

//Step 2: Define the action hook
$hook = 'my_custom_event';

//Step 3: Create the function to execute
function my_custom_function( $args ) {
  //Code to execute
  error_log( 'The event has run with argument: ' .$args['example_arg'] );
}

//Step 4: Schedule the event
$args = array(' example_arg' => 'value' );
wp_schedule_single_event( $timestamp, $hook, $args );

//Hook the function to the event
add_action( $hook, 'my_custom_function' );

This method allows you to effectively manage one-time tasks in WordPress.