Model/Cron.php
public function contactSync()
    {
        if ($this->jobHasAlreadyBeenRun('ddg_automation_customer_subscriber_guest_sync')) {
            $message = 'Skipping ddg_automation_customer_subscriber_guest_sync job run';
            $this->helper->log($message);
            return ['message' => $message];
        }

        //run the sync for contacts
        $result = $this->contactFactory->create()
            ->sync();
        //run subscribers and guests sync
        $subscriberResult = $this->subscribersAndGuestSync();

        if (isset($subscriberResult['message']) && isset($result['message'])) {
            $result['message'] = $result['message'] . ' - '
                . $subscriberResult['message'];
        }

        return $result;
    }
public function contactSync()
    {
        if ($this->jobHasAlreadyBeenRun('ddg_automation_customer_subscriber_guest_sync')) {
            $message = 'Skipping ddg_automation_customer_subscriber_guest_sync job run';
            $this->helper->log($message);
            return ['message' => $message];
        }

        //run the sync for contacts
        $result = $this->contactFactory->create()
            ->sync();
        //run subscribers and guests sync
        $subscriberResult = $this->subscribersAndGuestSync();

        if (isset($subscriberResult['message']) && isset($result['message'])) {
            $result['message'] = $result['message'] . ' - '
                . $subscriberResult['message'];
        }

        return $result;
    }
public function contactSync ( ) { if ( $ this -> jobHasAlreadyBeenRun ( 'ddg_automation_customer_subscriber_guest_sync' ) ) { $ message = 'Skipping ddg_automation_customer_subscriber_guest_sync job run' ; $ this -> helper -> log ( $ message ) ; return [ 'message' => $ message ] ; } //run the sync for contacts $ result = $ this -> contactFactory -> create ( ) -> sync ( ) ; //run subscribers and guests sync $ subscriberResult = $ this -> subscribersAndGuestSync ( ) ; if ( isset ( $ subscriberResult [ 'message' ] ) && isset ( $ result [ 'message' ] ) ) { $ result [ 'message' ] = $ result [ 'message' ] . ' - ' . $ subscriberResult [ 'message' ] ; } return $ result ; }
CRON FOR CONTACTS SYNC.

@return array
CRON FOR CONTACTS SYNC .