Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • AbstractCron
  • Task
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class AbstractCron

Base abstract class for representing a Blesta cron task. Also provides for logging task output to the cron log.

Blesta\Core\Automation\Type\Cron\AbstractCron implements Blesta\Core\Automation\Type\Common\AutomationTypeInterface, Blesta\Core\Automation\Tasks\Common\LoggableInterface

Direct known subclasses

Blesta\Core\Automation\Type\Cron\Task
Abstract
Namespace: Blesta\Core\Automation\Type\Cron
Package: blesta\core\Automation\Type\Cron
Copyright: Copyright (c) 2018, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at core/Automation/Type/Cron/AbstractCron.php
Methods summary
public
# __construct( stdClass $task, Minphp\Date\Date $date, array $options = [] )

Initialize the cron task with cron task data

Initialize the cron task with cron task data

Parameters

$task

An stdClass object containing:

  • id The cron task ID
  • key The cron task key
  • name The name of the cron task
  • type The type of cron task (e.g. interval or time)
  • task_run_id The ID of the runnable task
  • company_id The ID of the company
  • time The time of day to run the task
  • interval The time interval to run the task
  • enabled Whether or not the task is enabled
  • date_enabled The date timestamp that the task was enabled
  • date_last_started The date timestamp that the task last started
  • date_last_completed The date timestamp that the task last completed
  • plugin_id The ID of the plugin associated with the cron task
  • plugin_dir The plugin directory
  • plugin_name The name of the plugin associated with the cron task
  • plugin_version The version of the plugin associated with the cron task
  • plugin_enabled Whether or not the plugin is enabled
$date
instance of Minphp\Date\Date
$options

An array of options, including:

  • log_group The name of the cron log group to use for logging purposes
public stdClass
# raw( )

Retrieves the raw input for this task

Retrieves the raw input for this task

Returns

stdClass
An stdClass object representing the cron task

Implementation of

Blesta\Core\Automation\Type\Common\AutomationTypeInterface::raw()
public
# log( string $content )

Logs the given content to the cron log

Logs the given content to the cron log

Parameters

$content
The content to log

Implementation of

Blesta\Core\Automation\Tasks\Common\LoggableInterface::log()
public
# logComplete( )

Marks the current cron task log complete

Marks the current cron task log complete

Implementation of

Blesta\Core\Automation\Tasks\Common\LoggableInterface::logComplete()
public boolean
# canRun( string $date )

Determines whether the automation type can be run given a date

Determines whether the automation type can be run given a date

Parameters

$date
A date timestamp representing the date the automation type may be run at

Returns

boolean
True if the automation type may be run, or false otherwise

Implementation of

Blesta\Core\Automation\Type\Common\AutomationTypeInterface::canRun()
Blesta API documentation generated by ApiGen