Project

General

Profile

Actions

Bug #13309

closed

Cron validation prevents special strings such as @reboot

Added by Grant Henderson almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Cron
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:

Description

A recent change to the Cron package introduced field validation. Although the UI specifies time examples, some users may have entered special strings (e.g., @reboot) in the minute field, while leaving other time fields blank.

Example:

@reboot root sleep 300 && dosomething

The FreeBSD man page for Cron

https://www.freebsd.org/cgi/man.cgi?query=crontab&sektion=5&format=html

string meaning
------ -------
@reboot Run once, at startup of cron.
@yearly Run once a year, "0 0 1 1 ".
@annually (same as @yearly)
@monthly Run once a month, "0 0 1 * *".
@weekly Run once a week, "0 0 * * 0".
@daily Run once a day, "0 0 * * *".
@midnight (same as @daily)
@hourly Run once an hour, "0 * * * *".
@every_minute Run once a minute, "
/1 * * * *".
@every_second Run once a second.

@reboot appears to be the only non-time special string. The others could be written long hand.

Perhaps update the UI example, and allow one exception for @reboot?


Files

pfSense Cron 2022-06-27.png (28.4 KB) pfSense Cron 2022-06-27.png UI after inclusion of @reboot Grant Henderson, 06/27/2022 03:52 PM
Actions

Also available in: Atom PDF