my $tasks_to_do = $self->search( { -and => [ scheduled_run_time => { '<=', 'NOW()'}, status => 'pending' ] } );