<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/usr.sbin/cron/lib, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2020-03-30T03:26:52Z</updated>
<entry>
<title>cron: respect PATH from login.conf</title>
<updated>2020-03-30T03:26:52Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-03-30T03:26:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=89c7bb561344767c6e3fa925553675145b1540f7'/>
<id>urn:sha1:89c7bb561344767c6e3fa925553675145b1540f7</id>
<content type='text'>
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 &lt;andrew_tao173.riddles.org.uk&gt;
Reviewed by:	sigsys_gmail.com
Differential Revision:	https://reviews.freebsd.org/D23597
</content>
</entry>
<entry>
<title>cron(8): convert vfork() usage to fork()</title>
<updated>2020-02-10T02:40:23Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-02-10T02:40:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=9b36723388048ad6c120166fbc200bc16eb6a001'/>
<id>urn:sha1:9b36723388048ad6c120166fbc200bc16eb6a001</id>
<content type='text'>
vfork() is error-prone, and the usage here definitely grew to not be
clearly OK given vfork-semantics; e.g. setusercontext(3) within the child.

Rip out vfork() and the rest of the references to it. fork is heavier, but
it's unclear that the difference will be all that obvious.

Reported by:	Andrew Gierth and sigsys@gmail.com
</content>
</entry>
<entry>
<title>cron: add log suppression and mail suppression for successful runs</title>
<updated>2019-09-25T02:37:40Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-09-25T02:37:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=5b80de237b53fd14e3926dd58fc0b78be983ed84'/>
<id>urn:sha1:5b80de237b53fd14e3926dd58fc0b78be983ed84</id>
<content type='text'>
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&amp;m=152874866117948&amp;w=2

PR:		237538
Submitted by:	Naveen Nathan &lt;freebsd_t.lastninja.net&gt;
Reviewed by:	bcr (manpages)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D20046
</content>
</entry>
<entry>
<title>Add new functionality and syntax to cron(1) to allow to run jobs at a</title>
<updated>2018-06-07T22:38:40Z</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2018-06-07T22:38:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=a08d12d3f2d4f4dabfc01953be696fdc0750da9c'/>
<id>urn:sha1:a08d12d3f2d4f4dabfc01953be696fdc0750da9c</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible</title>
<updated>2017-03-04T11:38:03Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-03-04T11:38:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=64a0982bee3db2236df43357e70ce8dddbc21d48'/>
<id>urn:sha1:64a0982bee3db2236df43357e70ce8dddbc21d48</id>
<content type='text'>
This simplifies make logic/output

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
</content>
</entry>
<entry>
<title>cron(8): add support for /etc/cron.d and /usr/local/etc/cron.d</title>
<updated>2016-10-31T18:20:12Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2016-10-31T18:20:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=b2fd8384ffdd8ecba4fbf12670ff2e2247d560d9'/>
<id>urn:sha1:b2fd8384ffdd8ecba4fbf12670ff2e2247d560d9</id>
<content type='text'>
For automation tools it is way easier to maintain files in directories rather
than modifying /etc/crontab.

The files in those directories are in the same format as /etc/crontab

Reviewed by:	adrian
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D8400
</content>
</entry>
<entry>
<title>Add META_MODE support.</title>
<updated>2015-06-13T19:20:56Z</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2015-06-13T19:20:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=ccfb965433c67f3bda935a3cdf334be2e3c4348d'/>
<id>urn:sha1:ccfb965433c67f3bda935a3cdf334be2e3c4348d</id>
<content type='text'>
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
</content>
</entry>
<entry>
<title>dirdeps.mk now sets DEP_RELDIR</title>
<updated>2015-06-08T23:35:17Z</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2015-06-08T23:35:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=44d314f704764f0247a540648a4b4fc3e8012133'/>
<id>urn:sha1:44d314f704764f0247a540648a4b4fc3e8012133</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Updated dependencies</title>
<updated>2013-02-16T01:23:54Z</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2013-02-16T01:23:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=f5f7c05209ca2c3748fd8b27c5e80ffad49120eb'/>
<id>urn:sha1:f5f7c05209ca2c3748fd8b27c5e80ffad49120eb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Sync from head</title>
<updated>2012-11-04T02:52:03Z</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2012-11-04T02:52:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=23090366f729c56cab62de74c7a51792357e98a9'/>
<id>urn:sha1:23090366f729c56cab62de74c7a51792357e98a9</id>
<content type='text'>
</content>
</entry>
</feed>
