User Tools

Site Tools


uphp:library_functions:add_cron

This is an old revision of the document!


add_cron

WattmonOS 3.12+

Add a script to be executed by the CRON scheduler

Library

/lib/uphp/system.inc

Description

add_cron ( string $filneame , string $interval )

Add a script to be executed by the CRON scheduler after a reboot.

Parameters

$filename: Full path to filename to be executed

$interval: CRON-compatible interval using the following format:

second  minute   hour    dow

^ Field ^ Description ^

second execution second, can be * (every second), */x (i.e. */5 for every 5 seconds), or any number between 0 and 59
minute execution minute, can be * (every minute), */x (i.e. */15 for every 15 minutes), or any number between 0 and 59
hour execution hour, can be * (every hour), * /x (i.e. * /2 for every 2 hours), or any number between 0 and 23
dow execution day of the week, can be * (every day), or a value 0-6 (sunday to monday)

For example: “* 0 * *” would execute the script once an hour

Return Values

none  
uphp/library_functions/add_cron.1617787527.txt.gz · Last modified: 2021/09/13 05:56 (external edit)