wp_schedule_event not executing function call, even with add_action

Ahg…solved the problem, but why oh why.

Ok, the solution is to put the add_action outside the function.

function mmd_wpusercleanup_StartProcessingKeepList($nBatch)
{
$args = array('nBatch' => $nBatch);

if (wp_next_scheduled('mmd_ProcessKeepBatch'))
   wp_clear_scheduled_hook( 'mmd_ProcessKeepBatch' );

 $Status = wp_schedule_event( current_time('timestamp'), 'MMD_cleanupevent', 'mmd_ProcessKeepBatch', array( $args ) );  
}
// GOES HERE INSTEAD.
add_action( 'mmd_ProcessKeepBatch', 'mmd_wpusercleanup_ProcessKeepBatch' );  

Hopefully this can help someone else.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)