gcgov/framework-service-gcgov-cron-monitor

An internal to Garrett County Government plugin that provides access to \gcgov\framework\services\cronMonitor to record cron task runs

v1.0.0 2023-08-14 13:21 UTC

This package is auto-updated.

Last update: 2024-05-13 13:57:21 UTC


README

Primary purpose

Adds cron monitor service to gcgov/framework apps

Installation

  1. composer require gcgov/framework-service-gcgov-cron-monitor
  2. Add service namespace to /app/app.php method registerFrameworkServiceNamespaces: gcgov\framework\services\cronMonitor. Ex:
    public function registerFrameworkServiceNamespaces(): array {
    	return [
    		'\gcgov\framework\services\cronMonitor'
    	];
    }
  3. Add cron monitor api url to environment.json in appDictonary.cronMonitorUrl. Ex:
    "appDictionary": {
      "cronMonitorUrl": "https://apps.garrettcounty.local/cron-monitor/"
    }

Usage

$cronMonitor = new \gcgov\framework\services\cronMonitor\cronMonitor( $cronJobId );
//perform long running cron task
$cronMonitor->end();