Project

General

Profile

Actions

Bug #13309

closed

Cron validation prevents special strings such as @reboot

Added by Grant Henderson about 2 months ago. Updated about 1 month 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 #1

Updated by Jim Pingle about 2 months ago

  • Status changed from New to Feedback
  • Assignee changed from Jim Thompson to Jim Pingle
  • % Done changed from 0 to 100
Actions #2

Updated by Danilo Zrenjanin about 1 month ago

  • Status changed from Feedback to Resolved

Tested against the Cron package version 0.3.8_1

It works as expected.

I am marking this ticket resolved.

Actions

Also available in: Atom PDF