#
042267e0 |
| 10-May-2024 |
Paweł Krawczyk <p+freebsd@krvtz.net> |
Explain cron.d
Add details on the format of system cron files, which are mentioned in cron(8) which refers here but barely explained here.
Reviewed by: imp Pull Request: https://github.com/freebsd/
Explain cron.d
Add details on the format of system cron files, which are mentioned in cron(8) which refers here but barely explained here.
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1106
show more ...
|
Revision tags: release/13.3.0, release/14.0.0 |
|
#
fe590ffe |
| 01-Jun-2023 |
Eric van Gyzen <vangyzen@FreeBSD.org> |
Import vixie cron 4.0
Specifically, import the diff from commit e745bd4c10ab to commit 83563783cc2 in https://github.com/vixie/cron.git
My sole motivation is changing to the common MIT license. The
Import vixie cron 4.0
Specifically, import the diff from commit e745bd4c10ab to commit 83563783cc2 in https://github.com/vixie/cron.git
My sole motivation is changing to the common MIT license. The old license, especially the "buildable source" clause, is unfriendly for commercial users of this code. Simply changing the license without importing [most of] the code accompanying that license seemed legally dubious.
The most regrettable change is losing Paul's uucp path. I partially atone for this loss by restoring the upstream $Id$ tags, since $FreeBSD$ is no longer useful.
This is [intended to be] a complete list of the functional changes in this commit. Some changes were made so that we could consider vixie cron to be our upstream and reduce our diffs against it, while others were simply a good idea.
- main() - use putenv instead of setenv for PATH - open_pidfile no longer needs snprintf to build pidfile - crontab main() - abort() on impossible errors - check for truncation when building strings with snprintf - getdtablesize() -> sysconf(_SC_OPEN_MAX)
These changes were not taken from upstream's 4.0 diff because they [could] actually change behavior. Some of them might be beneficial, but should be taken separately.
- config.h - sendmail args: remove -oi and add -or0s - call setlocale(LC_ALL, "") at the top of main() - acquire_daemonlock - we already use pidfile - cast getpid(), uid_t, and gid_t to long for printf - remove unnecessary braces - I consider them beneficial - BSDi support - glue_strings() - use snprintf(), as we often already did
MFC after: on demand Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D40260
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
29358694 |
| 03-Mar-2021 |
Chris Rees <crees@FreeBSD.org> |
crontab.5: Correct claims on ranges and names
Ranges use the function get_number, which means that ranges of names are supported and indeed always have been, righ back to the initial import.
PR: d
crontab.5: Correct claims on ranges and names
Ranges use the function get_number, which means that ranges of names are supported and indeed always have been, righ back to the initial import.
PR: docs/253969 Reported by: Ben Bullock <benkasminbullock@gmail.com>
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
89c7bb56 |
| 30-Mar-2020 |
Kyle Evans <kevans@FreeBSD.org> |
cron: respect PATH from login.conf
As a followup to the use of login.conf environment vars (other than PATH) in cron, this patch adds PATH (and HOME) to the list of login.conf settings respected.
T
cron: respect PATH from login.conf
As a followup to the use of login.conf environment vars (other than PATH) in cron, this patch adds PATH (and HOME) to the list of login.conf settings respected.
The new logic is as follows:
1. SHELL is always _PATH_BSHELL unless explicitly overridden in the crontab file itself; no other settings are respected. This is unchanged.
2. PATH is taken from the first of: crontab file, login.conf, _PATH_DEFPATH
3. HOME is taken from the first of: crontab file, login.conf, passwd entry, unset
4. The current directory for invoking the command is taken from the crontab file's value of HOME (existing behavior), or the passwd entry, but not anywhere else (so it might not equal HOME if that was set in login.conf).
Submitted by: Andrew Gierth <andrew_tao173.riddles.org.uk> Reviewed by: sigsys_gmail.com Differential Revision: https://reviews.freebsd.org/D23597
show more ...
|
#
bc02c18c |
| 07-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357408 through r357661.
|
#
7466dbd6 |
| 05-Feb-2020 |
Kyle Evans <kevans@FreeBSD.org> |
cron(8): set the environment variables of the user and/or login class
Prior to processing environment variable set in the crontab file as those should be of higher precedent, pull in the user or log
cron(8): set the environment variables of the user and/or login class
Prior to processing environment variable set in the crontab file as those should be of higher precedent, pull in the user or login class environment.
This is another supporting feature for allowing one to configure system-wide settings that may affect both regular cron jobs as well as services.
This is the final part of D21481.
Submitted by: Andrew Gierth <andrew_tao173.riddles.org.uk>
show more ...
|
Revision tags: release/12.1.0 |
|
#
668ee101 |
| 26-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352587 through r352763.
|
#
5b80de23 |
| 25-Sep-2019 |
Kyle Evans <kevans@FreeBSD.org> |
cron: add log suppression and mail suppression for successful runs
This commit adds two new extensions to crontab, ported from OpenBSD: - -n: suppress mail on succesful run - -q: suppress logging of
cron: add log suppression and mail suppression for successful runs
This commit adds two new extensions to crontab, ported from OpenBSD: - -n: suppress mail on succesful run - -q: suppress logging of command execution
The -q option appears decades old, but -n is relatively new. The original proposal by Job Snijder can be found here [1], and gives very convincing reasons for inclusion in base.
This patch is a nearly identical port of OpenBSD cron for -q and -n features. It is written to follow existing conventions and style of the existing codebase.
Example usage:
# should only send email, but won't show up in log * * * * * -q date
# should not send email * * * * * -n date
# should not send email or log * * * * * -n -q date
# should send email because of ping failure * * * * * -n -q ping -c 1 5.5.5.5
[1]: https://marc.info/?l=openbsd-tech&m=152874866117948&w=2
PR: 237538 Submitted by: Naveen Nathan <freebsd_t.lastninja.net> Reviewed by: bcr (manpages) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20046
show more ...
|
Revision tags: release/11.3.0 |
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
bd6174f7 |
| 20-Apr-2019 |
Kyle Evans <kevans@FreeBSD.org> |
cron(8): schedule interval jobs that get loaded during execution
Jobs using the @<second> syntax currently only get executed if they exist when cron is started. The simplest reproducer of this is:
cron(8): schedule interval jobs that get loaded during execution
Jobs using the @<second> syntax currently only get executed if they exist when cron is started. The simplest reproducer of this is:
echo '@20 root echo "Hello!"' >> /etc/cron.d/myjob
myjob will get loaded at the next second==0, but this echo job will not run until cron restarts. These jobs are normally handled in run_reboot_jobs(), which sets e->lastexit of INTERVAL jobs to the startup time so they run 'n' seconds later.
Fix this by special-casing TargetTime > 0 in the database load. Preexisting jobs will be handled at startup during run_reboot_jobs as normal, but if we've reloaded a database during runtime we'll hit this case and set e->lastexit to the current time when we process it. They will then run every 'n' seconds from that point, and a full restart of cron is no longer required to make these jobs work.
Reported by: Juraj Lutter (otis_sk.freebsd.org) Reviewed by: allanjude, bapt, bjk (earlier version), Juraj Lutter MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D19924
show more ...
|
#
12455a9e |
| 15-Apr-2019 |
Kyle Evans <kevans@FreeBSD.org> |
cron(8): Add MAILFROM ability for crontabs
This changes the sender mail address in a similar fashion to how MAILTO may change the recipient. The default from address remains unchanged.
MFC after: 1
cron(8): Add MAILFROM ability for crontabs
This changes the sender mail address in a similar fashion to how MAILTO may change the recipient. The default from address remains unchanged.
MFC after: 1 week
show more ...
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
a08d12d3 |
| 08-Jun-2018 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Add new functionality and syntax to cron(1) to allow to run jobs at a given interval, which is counted in seconds since exit of the previous invocation of the job. Example user crontab entry:
@25 sl
Add new functionality and syntax to cron(1) to allow to run jobs at a given interval, which is counted in seconds since exit of the previous invocation of the job. Example user crontab entry:
@25 sleep 10
The example will launch 'sleep 10' every 35 seconds. This is a rather useless example above, but clearly explains the functionality.
The practical goal here is to avoid overlap of previous job invocation to a new one, or to avoid too short interval(s) for jobs that last long and doesn't have any point of immediate launch soon after previous run.
Another useful effect of interval jobs can be noticed when a cluster of machines periodically communicates with a single node. Running the task time based creates too much load on the node. Running interval based spreads invocations across machines in cluster. Note that -j/-J won't help in this case.
Sponsored by: Netflix
show more ...
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0 |
|
#
009e81b1 |
| 22-Jan-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
MFH @r294567
|
#
5dc6cc42 |
| 06-Jan-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r293175 through r293279.
|
#
1a5c9277 |
| 05-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
43d53dba |
| 05-Jan-2016 |
Jilles Tjoelker <jilles@FreeBSD.org> |
Add sbin and /usr/local directories to _PATH_DEFPATH.
Set _PATH_DEFPATH to /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin. This is the path in the default class in the default /etc/log
Add sbin and /usr/local directories to _PATH_DEFPATH.
Set _PATH_DEFPATH to /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin. This is the path in the default class in the default /etc/login.conf, excluding ~/bin which would not be expanded properly in a string constant.
For normal logins, _PATH_DEFPATH is overridden by /etc/login.conf, ~/.login_conf or shell startup files. _PATH_DEFPATH is still used as a default by execlp(), execvp(), posix_spawnp() and sh if PATH is not set, and by cron. Especially the latter is a common trap (most recently in PR 204813).
PR: 204813 Reviewed by: secteam (delphij), alfred
show more ...
|
Revision tags: release/10.2.0, release/10.1.0 |
|
#
246e7a2b |
| 02-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r269962
Submitted by: Anish Gupta (akgupt3@gmail.com)
|
#
ee7b0571 |
| 19-Aug-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head from 7/28
|
#
1b833d53 |
| 13-Aug-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r269943.
|
Revision tags: release/9.3.0 |
|
#
01c2b8ac |
| 20-Jun-2014 |
Baptiste Daroussin <bapt@FreeBSD.org> |
use .Mt to mark up email addresses consistently (part2)
PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de>
|
Revision tags: release/10.0.0, release/9.2.0 |
|
#
cfe30d02 |
| 19-Jun-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge fresh head.
|
Revision tags: release/8.4.0, release/9.1.0 |
|
#
300675f6 |
| 27-Nov-2012 |
Alexander Motin <mav@FreeBSD.org> |
MFC
|
#
a10c6f55 |
| 11-Nov-2012 |
Neel Natu <neel@FreeBSD.org> |
IFC @ r242684
|
#
23090366 |
| 04-Nov-2012 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Sync from head
|
#
7a5c30c5 |
| 26-Oct-2012 |
Maxim Sobolev <sobomax@FreeBSD.org> |
Second attempt to add @every_second keyword support. Due to multiple requests, default to the previous 60-seconds scheduling method unless there is any @every_second entries to conserve CPU cycles an
Second attempt to add @every_second keyword support. Due to multiple requests, default to the previous 60-seconds scheduling method unless there is any @every_second entries to conserve CPU cycles and power.
This change also improves scheduling in the default mode by running as close to the beginning of the minnute as possible by replacing sleep(3) with nanosleep(2). Previously, the tasks would run anywhere within the first second of the minute and that offset drifted back and forth each time cron(8) was engaged.
MFC after: 1 month
show more ...
|