FCRONTAB(5)
π FCRONTAB(5) π
πΈ NAME πΈ
fcrontab β the file format to define the jobs that fcron should run, and their schedules.
β¨ DESCRIPTION β¨
okay bestie, a fcrontab is a file containing all the tables used by the fcron(8) daemon. In other words, it's how a user tells the daemon "execute this command at this moment". Each user has their own fcrontab, and its commands are executed on behalf of their owner (in particular with the user's permissions β only root can run a job as another using the option runas (see below)).
Blank lines, lines beginning by a hash sign (#) (these are considered comments), leading blanks and tabs are ignored. Each line in a fcrontab file can be either:
- an environment setting,
- an option setting,
- entries based on elapsed system up time,
- entries based on absolute time (like normal crontab entries), or
- entries run periodically.
Any logical line (an entry or an assignment) can be divided into several real lines (the lines which end by a newline character) by placing a backslash (\) before the newline character (\n).
π§ THE ENVIRONMENT SETTINGS π§
The environment settings are of the form:
name = value
where the blanks around the equal-sign (=) are ignored and optional. Trailing blanks are also ignored, but you can place the value in quotes (simple or double, but matching) to preserve any blanks in the value.
When fcron executes a command, it always sets USER, and HOME as defined in /etc/passwd for the owner of the fcrontab from which the command is extracted. TZ is also defined to the value of the option timezone when this option is used. It also defines SHELL to the value of the SHELL used to run the command. Fcron uses the value of SHELL from the fcrontab if any, otherwise it uses the value from fcron.conf if any, or in last resort the value from /etc/passwd. HOME and SHELL may be overridden by settings in the fcrontab, but USER may not. Every other environment assignments defined in the user fcrontab are then made, and the command is executed.
By default, fcron will send emails using the email "Content-Type:" header of "text/plain" with the "charset=" parameter set to the charmap / codeset of the locale in which fcron(8) is started up β i.e. either the default system locale, if no LC_* environment variables are set, or the locale specified by the LC_* environment variables (see locale(7)). You can use different character encodings for emailed fcron job output by setting the CONTENT_TYPE and CONTENT_TRANSFER_ENCODING variables in fcrontabs, to the correct values of the mail headers of those names.
Additionally, the special variables MAILFROM and MAILTO allow you to tell fcron from/to whom it should email the command's output. Note that these are in fact equivalent to global declarations of the options mailfrom and mailto (see below). They are used for backward compatibility, and it is recommended that you use the options mailfrom and mailto directly instead.
β³ ENTRIES BASED ON ELAPSED SYSTEM UP TIME β³
Jobs are scheduled to run once every m minutes of fcron's execution (which is normally the same as m minutes of system's execution). The time a system is suspended (to memory or disk) is considered as down time. To configure such a job, use configuration lines of the form:
@options frequency command
where frequency is a time value of the form value*multiplier+value*multiplier+...+value-in-minutes as "12h02" or "3w2d5h1". The first means "12 hours and 2 minutes of fcron execution" while the second means "3 weeks, 2 days, 5 hours and 1 minute of fcron execution". The only valid multipliers are β the manpage calls this "VALID TIME MULTIPLIERS", meaning: multipliers:
- months (4 weeks):
m - weeks (7 days):
w - days (24 hours):
d - hours (60 minutes):
h - seconds:
s
In place of options, user can put a time value: it will be interpreted as @first(<time>). If first option is not set, the value of "frequency" is used.
This kind of entry does not guarantee a time and date of execution (as the job is delayed at each startup by the time elapsed since the shutdown), but should be useful for jobs depending on the number of things done by the users (for instance, the filesystem should better be checked after a certain amount of use by the users rather than every x days, as the system may run from 1 day to x days during that x days interval).
The time remaining before next execution is saved every 1800 seconds (to limit damages caused by a crash) and when fcron exits after having received a SIGTERM signal, i.e. when systems go down. Thus, this kind of entries is particularly useful for systems that don't run regularly. The syntax being very simple, it may also be useful for tasks which don't need to be run at a specific time and date.
See also: options first, mail, nolog, serial, lavg, nice, runas (see below).
π SOME EXAMPLES OF LINES BASED ON ELAPSED SYSTEM UP TIME π
# Get our mails every 30 minutes
@ 30 getmails -all
# make some security tests every 48 hours of system up time,
# force a mail to be sent to root even if there is no output
@mailto(root),forcemail 2d /etc/security/msec/cron-sh/security.sh
π ENTRIES BASED ON TIME AND DATE π
The second type of fcrontab's entries begins by an optional &, which can be immediately followed by an optional number defining the frequency of execution (this is equivalent to option runfreq) or a declaration of options; it has five time and date fields, and a shell command:
&options min hrs day-of-month month day-of-week command
Note that the shell command may be preceded by a user name, which is equivalent to runas(<user>): as it is only here for backward compatibility you should use option runas (see below) instead. The frequency is interpreted as: "run this command after x matches of time and date fields". The time and date fields are β the manpage labels this "TIME AND DATE FIELDS":
- field: allowed values:
- minute:
0-59 - hour:
0-23 - day of month:
1-31 - month:
1-12(or names, see below) - day of week:
0-7(0 and 7 are both Sunday, or names)
- minute:
A field is always filled by either an asterisk (*), which acts as "first-last" range, a single number or a list.
Lists are numbers or range separated with commas (,). For instance: 2,5,15,23.
Ranges of number are of the form <begin>-<end>, where begin and end are included. For example, 3-5 specifies the values 3, 4 and 5. You can also add an optional /number to a range, where the number specifies skips of the number's value through the range. For example, 0-23/2 can be used in the hours field to specify command execution every other hour. Finally, one or several ~number can be added to turn off some specific values in a range. For example, 5-8~6~7 is equivalent to 5,8. The final form of a field is:
a[-b[/c][~d][~e][...]][,f[-g[/h][~i][~j][...]]][,...]
where the letters are integers.
You can also use an asterisk (*) in a field. It acts for "first-last". For example, a * in the field minute means all minutes from minute 0 down to minute 59.
Ranges can be included in a list as a single number. For instance: 2,5-10/2~6,15,20-25,30.
Names can also be used for the "month" and "day of week" fields. To do so, use the first three letters of the particular day or month (case doesn't matter). Please note that names are used exactly as numbers: you can use them in a list or a range.
If a day of month and a day of week are given, the command will execute only when both match with the current time and date unless option dayor is set. For example, with the line:
5 10 31 * 7 echo ''
echo will only be executed days which are a Sunday AND a 31th, at 10:05.
See also: options dayor, bootrun, runfreq, mail, nolog, serial, lavg, nice, runas (see below).
π SOME EXAMPLES OF ENTRIES BASED ON TIME AND DATE π
# run mycommand at 12:05, 12:35, 13:05, 13:35,
# 14:05 *and* 14:35 everyday
& 05,35 12-14 * * * mycommand -u me -o file
# get mails every hour past 20, 21, 22, and 24 minutes.
20-24~23 * * * * getmail
# save our work of the day every night at 03:45 with a low priority
# unless we are sunday, mail the output to jim and run that job
# at startup if computer was down at 03:45
&nice(10),mailto(jim),bootrun 45 03 * * *~0 "save --our work"
π ENTRIES RUN PERIODICALLY π
The third type of fcrontab's entries begin by a %, followed by a keyword from one of 3 different lists, and optional options.
π« *LY KEYWORDS π«
Those keywords are:
hourlydailymonthlyweekly
Those keywords tell fcron to run the command once from the beginning of the corresponding time interval to the end of that time interval. A time interval is, for example, the time from Monday 16:20 to Wednesday 01h43. For instance, the keyword weekly tells fcron to run a command once between Monday and Sunday each week.
With these two kinds of keywords, user must give the needed time fields (as defined in "Entries based on time and date" (see above)) to specify when the command should be run during each time interval. NEEDED TIME FIELDS FOR EACH KEYWORD β keywords must be followed by the fields:
hourly,midhourly: minutesdaily,middaily,nightly,weekly,midweekly: minutes and hoursmonthly,midmonthly: minutes, hours and days
π MID*LY KEYWORDS π
They are similar to the *ly ones:
midhourlymiddailynightlymidmonthlymidweekly
They work exactly like the *ly keywords, except that the time intervals are defined from middle to middle of the corresponding *ly intervals: midweekly will run a command once from Thursday to Wednesday. Note that nightly is equivalent to middaily.
For example:
%nightly,mail(no) * 21-23,3-5 echo "a nigthly entry"
will run the command once each night either between 21:00 and 23:59, or between 3:00 and 5:59 (it will run as soon as possible. To change that, use option random) and won't send mail (because option mail is set to "no").
See also: options lavg, noticenotrun, strict, mail, nolog, serial, nice, runas, random (see below).
β *S KEYWORDS β
They are:
minshoursdaysmonsdow
Those keywords act differently, as follows:
run this command once during EACH time interval specified, ignoring the fields below the keyword in the time interval definition (ahoursprevents theminsfield from being considered as a time interval, but it will be used to determine when the line should be run during an interval: see the note below) (dowmeans"day of week").
Such a keyword is followed by 5 time and date fields (the same fields used for a line based on absolute time (see above)). Furthermore, there must be some non-matching time and dates in the lines with that kind of keyword (i.e. the following is not allowed:
%hours * 0-23 * * * echo "INCORRECT line!"
but
%hours * 0-22 * * * echo "Ok."
is allowed).
Note: a single number in a field is considered as a time interval π
%mins 15 2-4 * * * echo
will run at 2:15, 3:15 AND 4:15 every day. Periodt.
But heads up bestie β all fields below the keywords are ignored in time interval definition:
%hours 15 2-4 * * * echo
will run only ONCE, either at 2:15, 3:15 OR 4:15.
See also: option random (see below).
π VIXIE CRON SHORTCUTS π
Ok so to make sure we play nice with Vixie cron, Vixie cron shortcuts are supported β¨ But lowkey, using them isn't really recommended, because they just don't have the flexibility that fcron brings π Also, when the exact time of execution isn't critical, the up-time-based lines are the move instead β like, genuinely better.
A task using a Vixie cron shortcut looks like this:
shortcut command
Below is the full list of available shortcuts, plus some fcron-specific additions, with their fcron equivalent π«Ά
@rebootβ Run once, at startup β fcron equivalent:@runatreboot,runonce(true)@resumeβ Run once, at resume from suspend/hibernate β fcron equivalent:@runatresume,runonce(true)@yearlyβ Run once a year β fcron equivalent:0 0 1 1 * @ 12m@annuallyβ (same as@yearly) β fcron equivalent:0 0 1 1 * @ 12m@monthlyβ Run once a month β fcron equivalent:0 0 1 * * @ 1m@weeklyβ Run once a week β fcron equivalent:0 0 * * 0 @ 1w@dailyβ Run once a day β fcron equivalent:0 0 * * * @ 1d@midnightβ (same as@daily) β fcron equivalent:0 0 * * *@hourlyβ Run once an hour β fcron equivalent:0 * * * * @ 1h
A few examples, because seeing it is believing π¦
# run check_laptop_logs.sh at the first minute of every hour:
@hourly check_laptop_logs.sh
# run check_web_server.sh and check_file_server.sh every day at exactly
# midnight, both at the same time:
@daily check_web_server.sh
@daily check_file_server.sh
# run compress_home_made_app_log_files.sh at exactly midnight
# on the first day of every month:
@monthly compress_home_made_app_log_files.sh
However, you might want to swap those task definitions out for something like this π
# run check_laptop_logs.sh after every hour of system up time:
@ 60 check_laptop_logs.sh
# run check_web_server.sh and check_file_server.sh every night between midnight
# and 3am, one at a time:
%nightly,serial * 0-3 check_web_server.sh
%nightly,serial * 0-3 check_file_server.sh
# Run compress_home_made_app_log_files.sh once a month, only at night
# when the load is low:
@monthly,lavg(0.5) * 21-23,0-5 * compress_home_made_app_log_files.sh
Last, but not least (and this one actually matters, so listen up π) β tasks defined using a Vixie cron shortcut will only behave the same as in Vixie cron if they haven't been modified by some earlier option definition. That's the case if you import a Vixie cron crontab into fcron without modification, or if you precede the task definition by a reset, like:
!serial
@ 10 fcron_task_1
@ 25 fcron_task_2
!reset
@reboot start_unprivileged_user_program
@daily cleanup_tmp.sh
In the example above, serial would apply to the last two tasks if we hadn't used reset π
β¨ OPTIONS β¨
The options can be set either for every line below the declaration, or for an individual line π
- Case one: the setting is done on a whole line, immediately after an exclamation mark (
!) β¨ - Case two: it's done after a
&, a%or a@β depending on the type of scheduling π₯
And note that an option declaration in a schedule overrides the global declaration of that same option. Iconic behaviour, no notes πΈ
Options are separated by commas (,) and their arguments, if any, are placed in parentheses (( and )) and separated by commas. No space or surrounding (double-)quote is allowed β like, do not do that π«Ά
A declaration of options looks like:
option[(arg1[,arg2][...])][,option[(arg1[...])]][...]
where option is either the name of an option or its abbreviation. The options are (default value in parentheses):
π VALID OPTIONS IN A FCRONTAB π
bootrun,bβboolean(false)β Run an&-line (i.e. based on date and time) at fcron's startup (or the system's resume after suspend/hibernation) if it should have run during system down time. More precisely, such jobs will be added to thelavgqueue (if one of thelavgoption was set) or theserialqueue, so you don't get too many jobs all starting at the same time on fcron's startup πdayandβboolean(true)β Perform a logic AND between week and month day.
See also: options dayor.
dayorβboolean(false)β Perform a logic OR between week and month day.
See also: options dayand.
erroronlymailβboolean(false)β Mail output only if the job exited with a non-zero status π
See also: options mail, mailto, forcemail, nolog.
exesevβboolean(false)β Can a job be executed several times simultaneously?
See also: options serialonce, lavgonce.
first,fβtime-valueβ Delay before the first execution of a job based on system up time (@-lines) β Useful in the following case: you have several jobs running, say, every hour. By setting a differentfirstvalue for each job, you can avoid them running simultaneously every single time. You can also set it to0, which is useful when used in conjunction with optionvolatile.forcemailβboolean(false)β Mail output even if zero-length π¬ Setting this option totruewill also setmailtotrue.
See also: options mail, mailto, erroronlymail, nolog.
jitterβinteger(0)β Run the task between0andjitterseconds later than it should have been run. This option only applies to&-lines, and it's intended for systems where many jobs are supposed to be started at the same minute:jitterwill randomly spread the start of all those jobs across the firstjitterseconds of the minute, instead of starting all of them at the first second of the minute π The argument must be between0and255(inclusive).
See also: option random.
lavgβreal(0) real(0) real(0)β Set the values of the 1, 5 and 15-minute (in this order) system load average values below which the job should run. The values have a maximum of 1 decimal (i.e.2.3): if there are more than 1 decimal, the value will be rounded off. Set a value to0to ignore the corresponding load average (or all of the values, to run the job regardless of the load average) π
See also: options lavg1, lavg5, lavg15, until, lavgonce, lavgor, lavgand, strict, noticenotrun.
lavg1,lavg5,lavg15βreal(0)β Set the threshold of, respectively, the 1, 5 or 15 minutes system load average value. Set one of them to0to ignore the corresponding load average.
See also: options lavg.
lavgandβboolean(true)β Perform a logic AND between the 1, 5 and 15 minutes system load average values.
See also: options lavg, lavgor.
lavgonceβboolean(1)β Can a job be queued several times in thelavgqueue simultaneously?
See also: options lavg.
lavgorβboolean(false)β Perform a logic OR between the 1, 5 and 15 minutes system load average values.
See also: options lavg, lavgand.
mail,mβboolean(true)β Mail output (if any) or not βοΈ Setting this option tofalsewill also setforcemailtofalse.
See also: options mailto, forcemail, erroronlymail, nolog.
mailfromβemail-address(user job is run as)β Use this as theFrom:address when mailing job outputs. It can be either a single user-name or a fully qualified email address. In the former case, fcron will add the hostname automatically π¦ Settingmailfromto an empty value is equivalent to resetting it to the default value of the name of the user the job is run as.
See also: options mail, forcemail, erroronlymail, nolog, mailto.
mailtoβemail-address(name of file's owner)β Mail output (if needed) toemail-addressπ It can be either a single user-name or a fully qualified email address. In the former case, fcron will add the hostname automatically. Amailtodeclared and empty (string"") is equivalent tomail(false).
See also: options mail, forcemail, erroronlymail, nolog, mailfrom.
nice,nβnice-valueβ Change job priority. Anice-valueis an integer from-20(highest priority) to19(lowest) β and only root is allowed to use a negative value with this option πnologβboolean(false)β If set totrue, log only errors for the corresponding job(s). May be useful for jobs running very often, and/or to reduce disk access on a laptop π
See also: options mail, mailto, erroronlymail, forcemail.
noticenotrunβboolean(false)β Should fcron mail the user to report the non-execution of a%-job or an&-job? (because of system down state (including suspend/hibernation) for both, or a too high system load average for the latter) π
See also: options lavg, strict.
randomβboolean(false)β In a line run periodically, this option answers the question: should this job be run as soon as possible in its time interval of execution (safer), or should fcron set a random time of execution in that time interval? π² Note that if this option is set, the job may not run if fcron is not running during the whole execution interval. Besides, you must know that the random scheme may be quite easy to guess for skilled people: thus, you shouldn't rely on this option to make important things secure. However, it shouldn't be a problem for most uses.
See also: option jitter.
rebootresetβboolean(false)β When set totrue, fcron will act as if the task was a new one every time the OS reboots π This is very similar to the optionvolatile, but based on OS reboots instead of fcron restarts. You may also want to use optionfirstif you use fcron that way.
See also: options first, volatile, runonce, runatreboot, runatresume.
resetβbooleanβ Reset all the options to default πrunasβuser-nameβ Run withuser-namepermissions and environment (only root is allowed to use this option) πrunatrebootβboolean(false)
π¦ runatreboot
boolean(false)
Okay so if you set this to true, the task gets run at system startup β literally immediately after the --sleeptime delay (which is 20 seconds by default, bestie) when the fcron daemon starts up for the first time after the OS has booted. And the way that this is in addition to the regular schedule? The regular schedule does not get modified by this option at all. Two vibes, one line β¨
So for instance, if a program should be started automatically right after boot and run from 7am to 6pm, you could use the following fcrontab definitions:
&runatreboot 0 6 * * 1-5 start_my_program.sh
& 0 7 * * 1-5 stop_my_program.sh
See also: options volatile, runonce, runatresume, rebootreset.
πΈ runatresume
boolean(false)
Same energy, different moment π β if you set this to true, the task will be run at system resume (like, coming back from suspend, or hibernation). And again: this is in addition to the regular schedule, which won't be modified by this option. Periodt.
For instance, if a program should be started automatically right after a system resume, and run from 7am to 6pm, you could use the following fcrontab definitions:
&runatresume 0 6 * * 1-5 start_my_program.sh
& 0 7 * * 1-5 stop_my_program.sh
See also: options volatile, runonce, runatreboot, rebootreset.
π runfreq, r
integer
Run every "runfreq" matches of time and date. Lowkey important: this option is ignored for lines based on elapsed system up time. Just so you know π«Ά
π runonce
boolean(false)
Do not re-schedule the task after it has run once, until the next OS reboot (if volatile is not set) or until the next fcron daemon restart (if volatile is set). One and done, no encore π¦
See also: options volatile, rebootreset, runatreboot, runatresume.
π serial, s
boolean(false)
Fcron runs at most 1 serial jobs (ie. for which the option serial is set to true), and the same number of lavg serial jobs (ie. for which both option serial and lavg (or lavg1 or lavg5 or lavg15) are set to true) simultaneously. This value may be modified by fcron's option -m. This option is especially useful when used with resource-intensive jobs in order to limit the system overload. So good for keeping your poor machine from absolutely losing it π
See also: options serialonce, lavg.
β serialonce
boolean(0)
Can a job be queued several times in serial queue simultaneously? That's the whole question, bestie π
See also: options exesev, lavgonce.
π stdout
boolean(false)
If fcron is running in the foreground, then also let jobs print to stderr/stdout instead of mailing or discarding it. So you actually get to see the tea instead of it being shipped off or yeeted π
See also: fcron's option --once in fcron(8).
π§ strict
boolean(true)
Okay so imagine a lavg %-job is at the end of a time interval of execution β what do we do with it? Should it be removed from the lavg queue (strict(true), so the job is not run) or be let there until the system load average allows its execution (strict(false))? Choose your fighter βοΈ
See also: options lavg, noticenotrun.
π timezone
timezone-name(time zone of the system)
Run the job in the given time zone. timezone-name is a string which is valid for the environment variable TZ β see the documentation of your system for more details. For instance, "Europe/Paris" is valid on a Linux system. This option handles daylight saving time changes correctly (iconic behaviour, honestly π). The TZ environment variable is set to the value of timezone when a job defining this option is run.
Please note that if you give an erroneous timezone-name argument, it will be SILENTLY ignored, and the job will run in the time zone of the system. No error, no warning, just vibes π
WARNING: do not use optiontimezoneand optiontzdiffsimultaneously! There is no need to do so, andtimezoneis cleverer thantzdiff. Fr fr, just don't.
See also: options tzdiff.
π tzdiff
integer(0)
WARNING: this option is deprecated: use option timezone instead! Like, respectfully, it's giving legacy π«Ά
Time zone difference (in hours, between -24 and 24) between the system time, and the local real time. This option allows a user to define its &- and %-lines in the local time. Note that this value is set for a whole fcrontab file, and only the last definition is taken into account. tzdiff is quite stupid: it doesn't handle daylight saving changes, while option timezone does, so you should use the latter. Not me calling an option stupid but here we are π
See also: options timezone.
β³ until
time-value(0)
Set the timeout of the waiting of the wanted system load average values. If the timeout is exceeded, the job runs no matter the load average β it's over, we're going, no more waiting around. Set until to 0 to remove the timeout.
See also: options lavg.
π¦ volatile
boolean(false)
When set to true, the job is based on a "volatile" system up time, i.e. restart counting each time fcron is started. This is useful when fcron is started by a script running only, for instance, during a dialup connection: the "volatile" system up time then refers to the dialup connection time. You may also want to use option first if you use fcron that way. iykyk πΈ
See also: options first, stdout, rebootreset, lines based on elapsed system up time, fcron's command line argument --once in fcron(8).
Okay so, some general rules about all of this π
A boolean argument can be non-existent, in which case parentheses are not used and it means true; the string "true", "yes" or 1 to mean true; and the string "false", "no" or 0 to mean false. See above for explanations about time value (section "entries based on elapsed system up time").
Note that dayand and dayor are in fact the same option: a false value to dayand is equivalent to a true to dayor, and reciprocally a false value to dayor is equivalent a true value to dayand. It is the same for lavgand and lavgor. They're literally the same person, different outfits π
Note a special case to be handled: A job should be entered into the serial queue, but the previous entry for this job has not been completed yet, because of high system load or some external event. Option serialonce answers the question: should the new entry of the job be ignored? This way one can distinguish between jobs required to run a certain number of times, preferably at specified times, and tasks to be performed irrespective of their number (-> serialonce(true)), which make the system respond faster.
The same considerations apply for the load average queue, and can be expressed with option lavgonce.
Moreover, if the serial or the lavg queue contains respectively more than 30 and 30 jobs, any new job is refused and not run to avoid an overwhelming of system resources. In this case, an error message is logged through syslog. So yeah β 30 and 30, that's the ceiling π
Finally, if jobs remain in the lavg or serial queues when fcron stops, they will be put once in the corresponding queue on startup (their order may not be conserved). They get a second chance, slay β¨
π« AN EXAMPLE OF AN OPTION DECLARATION:
!reset,serial(true),dayor,bootrun(0),mailto(root),lavg(.5,2,1.5)
π EXAMPLES
π AN EXAMPLE OF A USER FCRONTAB
# use /bin/bash to run commands, ignoring what /etc/passwd says
SHELL=/bin/bash
# mail output to thib, no matter whose fcrontab this is
!mailto(thib)
# define a variable which is equivalent to " Hello thib and paul! "
# here the newline characters are escaped by a backslash (\)
# and quotes are used to force to keep leading and trailing blanks
TEXT= " Hello\
thib and\
paul! "
# we want to use serial but not bootrun:
!serial(true),b(0)
# run after five minutes of execution the first time,
# then run every hour
@first(5) 1h echo "Run every hour"
# run every day
@ 1d echo "fcron daily"
# run once between in the morning and once in the afternoon
# if systems is running at any moment of these time intervals
%hours * 8-12,14-18 * * * echo "Hey boss, I'm working today!"
# run once a week during our lunch
%weekly * 12-13 echo "I left my system on at least once \
at lunch time this week."
# run every Sunday and Saturday at 9:05
5 9 * * sat,sun echo "Good morning Thibault!"
# run every even days of march at 18:00, except on 16th
0 18 2-30/2~16 Mar * echo "It's time to go back home!"
# the line above is equivalent to
& 0 18 2-30/2~16 Mar * echo "It's time to go back home!"
# reset options to default and set runfreq for lines below
!reset,runfreq(7)
# run once every 7 matches (thanks to the declaration above),
# so if system is running every day at 10:00, this will be
# run once a week
& 0 10 * * * echo "if you got this message last time 7 days ago,\
this computer has been running every day at 10:00 last week.\
If you got the message 8 days ago, then the system has been down \
one day at 10:00 since you got it, etc"
# wait every hour for a 5 minutes load average under 0.9
@lavg5(0.9) 1h echo "The system load average is low"
# wait a maximum of 5 hours every day for a fall of the load average
@lavgand,lavg(1,2.0,3.0),until(5h) 1d echo "Load average is going down"
# wait for the best moment to run a heavy job
@lavgor,lavg(0.8,1.2,1.5),nice(10) 1w echo "This is a heavy job"
# run once every night between either 21:00 and 23:00 or
# between 3:00 and 6:00
%nightly,lavg(1.5,2,2) * 21-23,3-6 echo "It's time to retrieve \
the latest release of Mozilla!"
π FILES
/usr/local/etc/fcron.confβ Configuration file for fcron, fcrontab and fcrondyn: contains paths (spool dir, pid file) and default programs to use (editor, shell, etc). Seefcron.conf(5)for more details./usr/local/etc/fcron.allowβ Users allowed to use fcrontab and fcrondyn (one name per line, special name"all"acts for everyone) π«Ά/usr/local/etc/fcron.denyβ Users who are not allowed to use fcrontab and fcrondyn (same format as allow file) π/usr/local/etc/pam.d/fcron(or/usr/local/etc/pam.conf) β PAM configuration file for fcron. Take a look atpam(8)for more details.
π SEE ALSO
If you're learning how to use fcron from scratch, I suggest that you read the HTML version of the documentation (if your are not reading it right now! :) ): the content is the same, but it is easier to navigate thanks to the hyperlinks. Literally the same tea, just with nicer hyperlinks β¨
π AUTHOR
Thibault Godouet <fcron@free.fr>
And that's the whole page, bestie β you ate that π This gorgeous thing is the FCRONTAB(5) manual page, dated 06/06/2026 (aka 06 June 2026), and it's all yours now. Go schedule something iconic π
β¨
π¦ where this page comes from
- arch rolling: fcron 3.4.1-1 Β· GPL-2.0-or-later
- nixpkgs unstable: fcron 3.4.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms