Skip to content
Snippets Groups Projects
Select Git revision
  • 4604e92a0102383b8b87152852ba3fed74cf9600
  • master default protected
  • update-renderer-class
3 results

asimax.class.js

Blame
  • cronlog.class.php 14.15 KiB
    <?php
    /**
     * ______________________________________________________________________
     * 
     *  _____                 _       _             _                        
     * /  __ \               (_)     | |           (_)                       
     * | /  \/_ __ ___  _ __  _  ___ | |__   __   ___  _____      _____ _ __ 
     * | |   | '__/ _ \| '_ \| |/ _ \| '_ \  \ \ / / |/ _ \ \ /\ / / _ \ '__|
     * | \__/\ | | (_) | | | | | (_) | |_) |  \ V /| |  __/\ V  V /  __/ |   
     *  \____/_|  \___/|_| |_| |\___/|_.__/    \_/ |_|\___| \_/\_/ \___|_|   
     *                      _/ |                                             
     *                     |__/                                              
     * ______________________________________________________________________
     * 
     * The cronjob viewer for centralized monitoring of cronjobs using
     * Axels cronrwapper (see <https://github.com/axelhahn/cronwrapper>).
     * 
     * You can browse all servers to see 
     * - the last status of all cronjobs
     * - results an execution times of running jonbs
     * - a timeline for all jobs running > 60s
     * 
     * 
     * Free software. Open Source. GNU GPL 3.
     * SOURCE: <https://git-repo.iml.unibe.ch/iml-open-source/cronlog-viewer>
     * 
     * ______________________________________________________________________
     * 
     * The cronlog class contains non visual methods
     * @see cronlog-renderer.class.php
     *
     * @license GNU GPL 3.0
     * @author Axel Hahn <axel.hahn@iml.unibe.ch>
     * 
     * 2024-09-20  <axel.hahn@unibe.ch>  added type declarations; update php docs
     */
    
    class cronlog
    {
    
    
        /**
         * Data dir with subdirs per host and its cronjob logs
         * @var string
         */
        protected string $_sDataDir = "__APPDIR__/data";
    
        /**
         * TTL for cached data
         * @var int
         */
        protected int $_iTtlCache = 60; // in sec
    
        /**
         * When show an error for expired jobs (keep in mind the latency to execute job and sync logs)
         * @var integer
         */
        protected int $_iExpiredJobsFailAfter = 60 * 30; // in sec
    
        /**
         * Minimal TTL for a cronjob
         * @var int
         */
        protected int $_iMinTtl = 0; // in sec
    
        /**
         * List of cronjobs to hide in the web view
         * @var array
         */
        protected array $_aSkipJoblogs = [];