PHP code example of 10n / health-vault-magento-1

1. Go to this page and download the library: Download 10n/health-vault-magento-1 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

10n / health-vault-magento-1 example snippets


class MyModule_Model_Cron extends Mage_Cron_Model_Observer
{

    protected function _processJob($schedule, $jobConfig, $isAlways = false)
    {
        $startTime = microtime(true);
        $result = parent::_processJob($schedule, $jobConfig, $isAlways);
        $elapsed = microtime(true) - $startTime;
        $jobCode = $schedule->getJobCode();
        Mage::getModel('tenn_jobhealth/cron')->sendExecutionEvent($schedule, $jobConfig, $jobCode, $elapsed, $isAlways);

        return $result;
    }
}