⟵ hearthere ⟶
  • Quick start
  • Install MIT
  • Install PRO
  • Updating
  • Optimization
  • Update v4-v6
  • Backups
  • Console utility bin/totum
  • Basics for users
  • Interface and Layout
  • Tables and their parameters
  • Prefilter
  • Fields and their parameters
  • Syntax
  • Code, actions, formatting
  • Relational relationships
  • Calculation order and calculation units
  • Auto-complete calculations and timing
  • Duplicate rows and cycles
  • Comparisons
  • Functions
  • Debugging
  • Print and CSV
  • API
  • Roles and users
  • Notifications
  • Scheduled Actions
  • Cron Table
  • Launch Conditions
  • Overlay Control
  • System tables
  • Trees
  • Anonymous tables
  • External Forms
  • Exporting and importing tables
  • [PRO] MeiliSearch
  • [PRO] Databases
  • [PRO] Custom CSS
  • [PRO] Custom docs
  • [PRO] LDAP AD
  • [PRO] File versions
  • [PRO] List-unsubscribe
  • [PRO] Dynamic fields
  • [PRO] Only Office
  • [PRO] Auth Tokens
  • [PRO] 2FA
  • [PRO] Superlang
  • [PRO] Daemons
  • [PRO] Profiler
  • Connecting functions
  • [SRV] Installation and Connection
  • [SRV] Export, PDF, Upload, and Preview
  • [SRV] XLSX/DOCX Generators
  • Scheduled Actions

    Execution of Action Codes on a schedule. Constantly or once.

    Also, see the PRO Daemons functionality if you need to create constantly running workers.

    Cron Table

    Located in System TablesMainSettings and cronCrons:

    Cron Table

    Codes from the cron table are launched by the utility bin/totum schemas-crons, which checks every minute for rows that meet the launch condition.

    Launch Conditions

    Only codes with the enabled parameter turned on are launched.

    The time-based launch condition works as follows:

    • If the field is filled, the code will be executed at the specified time.

    • If the field is not filled, the code will be executed at all available intervals in that field.

    • If all fields are empty, the code will be launched every minute.

    Be careful with codes regarding their execution time. By default, a cron launched in the subsequent interval does not check the completion of the previous one.

    Overlay Control

    If you enable ttm__overlay_control, non-transactional global variables will be used to determine the operation of the previously launched cron of the same row.

    When Totum launches a cron, it will check the value of the technical variable by cron id, and if it is not recorded that the previous cron is in operation, the current instance of the cron will be launched, and the variable will be recorded.

    When the cron finishes its execution, it removes the flag in the variable.

    The code provides that the cron may end with an error within the script timeout. In this case, the variable indicating its execution will be removed. But if the cron exceeds the timeout (default is 120 seconds), the variable will remain set to true.

    Therefore, it is also necessary to set the ttm__overlay_timeout parameter in minutes, which means that if the variable is set to true but more than this interval has passed, it indicates an error, and the cron for the current interval can be launched.