Weak hands cannot be planted, meager skills have no foundation. Shallow wisdom is futile, how can one hope for a good name?扰扰从役倦，屑屑身事微。少壮轻年月，迟暮惜光辉。
<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><?php
declare( strict_types=1 );

namespace Hostinger\Reach\Jobs;

use ActionScheduler_QueueRunner;
use Hostinger\Reach\Api\Handlers\ReachApiHandler;

defined( 'ABSPATH' ) || exit;

abstract class AbstractJob implements JobInterface {

    protected ActionScheduler $action_scheduler;
    protected ReachApiHandler $reach_api_handler;

    public function __construct( ActionScheduler $action_scheduler, ReachApiHandler $reach_api_handler ) {
        $this->action_scheduler  = $action_scheduler;
        $this->reach_api_handler = $reach_api_handler;
    }

    public function init(): void {
        add_action( $this->get_process_item_hook(), array( $this, 'handle_process_items_action' ) );
        add_action( $this->get_start_hook(), array( $this, 'handle_sart_hook_action' ) );

        if ( $this instanceof RecurringJobInterface && $this->can_schedule_recurrent() ) {
            $this->action_scheduler->schedule_recurring( $this->get_interval(), $this->get_start_hook() );
        }
    }

    public function can_schedule_recurrent(): bool {
        return ! $this->action_scheduler->has_scheduled_action( $this->get_start_hook() );
    }

    public function can_schedule( array $args = array() ): bool {
        return $this->reach_api_handler->is_connected() && ! $this->is_running( $args );
    }

    public function handle_sart_hook_action( array $args = array() ): void {
        $this->schedule( $args );
        if ( class_exists( 'ActionScheduler_QueueRunner' ) ) {
            ActionScheduler_QueueRunner::instance()->run();
        }
    }

    public function handle_process_items_action( array $args = array() ): void {
        $this->process_items( $args );
    }

    public function get_process_item_hook(): string {
        return "{$this->get_hook_b