revised anscheduler_loop_run() call