Re: Cronjob Cvsup - What?

2013-01-27 Thread Zyumbilev, Peter


On 27/01/2013 06:34, Lowell Gilbert wrote:
 If you needed version control features on your ports tree (especially if
 you were regularly contributing changes to ports), getting and updating
 your tree through subversion would have some extra features you might
 want, but it doesn't sound as if that is the case for you.
 
 Unless you have a specific reason why portsnap doesn't fit your use
 case, it's definitely the way to go for just keeping a ports tree
 updated regularly.


Last 10 years I am using cvsup. Any good guide for the transition to
subversion  ?

For ports is easy(portsnap), but I for system update I still have
problems saying good bye to old habits and I still use cvsup...:-)

Peter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob Cvsup - What?

2013-01-27 Thread Matthew Seaman
On 27/01/2013 00:11, W. D. wrote:
 What would be the best Cron command to keep ports updated on a daily
 basis?

Try this as a crontab entry:

0  3  *  *  *  *  /usr/sbin/portsnap cron update

Two points to note:

1) The 'cron' verb is important for anyone setting up an automated job
like this.  It causes portsnap to wait for a random number of seconds
(but less than 1 hour) before connecting to the portsnap server.  Since
the tendency is for people to schedule cron jobs to happen on the hour,
this helps to avoid everyone connecting at once and smooths out the
server load.

2) This assumes that you have previously run

   portsnap fetch extract

to get yourself a portsnap-ready copy of the ports tree.  You only need
to do that once, but you should move aside any pre-existing copy of
/usr/ports obtained by any means other than portsnap(8) before you do
(but keep anything under /usr/ports/distfiles and maybe
/usr/ports/packages).  Something like:

   cd /usr
   mv ports ports.old
   mkdir ports
   mv ports.old/distfiles ports/distfiles
   mv ports.old/packages ports/packages
   portsnap fetch extract

Although this may be complicated if any of /usr/ports,
/usr/ports/distfiles or /usr/ports/packages are on a separate partition
or ZFS.

I say 'move aside' due to the caution imbued by having been a
professional sysadmin for more years than I care to remember.  If you
are still convinced of your own infallibility, then you might find rm(1)
an acceptable alternative.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matt...@infracaninophile.co.uk



signature.asc
Description: OpenPGP digital signature


Re: Cronjob Cvsup - What?

2013-01-27 Thread Mike Clarke
On Sunday 27 Jan 2013 09:46:51 Matthew Seaman wrote:

 to get yourself a portsnap-ready copy of the ports tree.  You only need
 to do that once, but you should move aside any pre-existing copy of
 /usr/ports obtained by any means other than portsnap(8) before you do
 (but keep anything under /usr/ports/distfiles and maybe
 /usr/ports/packages).  Something like:
 
cd /usr
mv ports ports.old
mkdir ports
mv ports.old/distfiles ports/distfiles
mv ports.old/packages ports/packages
portsnap fetch extract
 
 Although this may be complicated if any of /usr/ports,
 /usr/ports/distfiles or /usr/ports/packages are on a separate partition
 or ZFS.

I suppose the best approach with ZFS would be to make a snapshot immediately 
prior to running portsnap.

-- 
Mike Clarke
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob Cvsup - What?

2013-01-27 Thread Matthew Seaman
On 27/01/2013 08:35, Zyumbilev, Peter wrote:
 Last 10 years I am using cvsup. Any good guide for the transition to
 subversion  ?

Most of the guides around freebsd.org are aimed at developers who will
be using SVN read-write.  For simple read-only use (ie. not checking
anything into the repository) the following should suffice:

  0) Install svn

 It isn't part of the base system, and it has too many external
 dependencies with different licensing terms for it to be bought
 in easily.  There's been some discussion about this, but it hasn't
 happened yet.  If it did, the imported version would be fairly
 minimal, and anyone wanting to use it for serious development
 would probably just grab the ports version anyhow.

 If all you want to do is pull down a copy of the sources then you
 can turn off most of the options to reduce the fairly large
 dependency tree to something more manageable:

 BDB=off: Berkeley Database
 BOOK=off: Install the Subversion Book
 ENHANCED_KEYWORD=on: Enhanced svn:keyword support
 FREEBSD_TEMPLATE=on: FreeBSD Project log template
 GNOME_KEYRING=off: Build with GNOME Keyring auth support
 KDE_KWALLET=off: Build with KDE KWallet auth support
 MAINTAINER_DEBUG=off: Build debug version
 MOD_DAV_SVN=off: mod_dav_svn module for Apache 2.X
 MOD_DONTDOTHAT=off: mod_dontdothat for Apache 2.X
 NEON=off: WebDAV/Delta-V repo access module (neon)
 P4_STYLE_MARKERS=off: Perforce-style conflict markers
 SASL=off: SASL support
 SERF=on: WebDAV/Delta-V repo access module (serf)
 STATIC=off: Build static version (no shared libs)
 SVNAUTHZ_VALIDATE=off: install svnauthz-validate
 SVNMUCC=off: Install Multiple URL Command Client
 SVNSERVE_WRAPPER=off: Enable svnserve wrapper
 TEST=off: Run subversion test suite

 There is the new devel/subversion-static port which does all that,
 and compiles subversion with static linkage so it has *no* runtime
 dependencies on anything else.  The disadvantage here is that if
 there is, say, a security hole discovered in the one of the
 libraries subversion links against, you won't secure the
 statically linked copy of subversion simply by updating to a fixed
 version of the shlib.  subversion-static is really only intended
 for providing a one-off binary package that people can download
 and install in order to bootstrap a more standard FreeBSD
 environment.

  1) Choose a SVN mirror close to you.  Currently there are two choices:

svn0.us-west.FreeBSD.org  -- Western USA
svn0.us-east.FreeBSD.org  -- Eastern USA

 Use whichever one gives you best performance.  Certainly from
 Europe at the moment us-east seems to be the best choice.

 The number of SVN mirrors and their global coverage should increase
 over time, but it will never need as many servers as the old cvsup
 network.

 The canonical list of SVN mirrors is here:


http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/svn-mirrors.html

  2) Choose a protocol for access the SVN servers.  Your choices in
 order of preference are

 svn://
 https://
 http://

 Use svn:// for best performance.  If you're concerned about MITM
 attacks injecting trojans into the FreeBSD sources, then use
 https and be sure to verify the certificate hashes on first
 connection.  Otherwise, if you're stuck behind a restrictive
 firewall, use http://

  3) Choose which branch you want to mirror.  It's relatively easy to
 switch between branches and doesn't involve downloading the entire
 contents of /usr/src all over again if you change your mind.
 However right now, the viable choices are

head --- Current, the bleeding edge, really only suitable
 for development purposes

stable/9 --- 9-STABLE  Still a rapidly changing development
 branch, but not quite so close to the edge, and
 with less bleeding involved.

stable/8 --- 8-STABLE  Ditto.

releng/9.1 --- 9.1-RELEASE  This tracks any security patches to
 version 9.1.  However, in this case you would be
 better advised to use freebsd-update(8) to maintain
 your /usr/src directory tree instead.

Similarly releng/9.0 releng/8.3 releng/7.4 for other supported
release versions.

 Don't be fooled into pulling down release/9.1.0 or the like --
 this is not a *branch* but a *snapshot*.  If you think you want
 release/9.1.0 then you really want releng/9.1 instead.

  4) Make sure /usr/src is empty.  Pre-existing files can cause you
 grief at some unexpected later date even if they don't cause the
 initial checkout to fail.

  5) Put it all together.  Run a command like so to check out the
 content of /usr/src for your chosen branch from your chosen 

Re: Cronjob Cvsup - What?

2013-01-27 Thread Matthew Seaman
On 27/01/2013 10:07, Mike Clarke wrote:

 I suppose the best approach with ZFS would be to make a snapshot immediately 
 prior to running portsnap.

Yes.  That would do the trick quite neatly.  In fact, snapshot before
each time you run portsnap.

Cheers

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matt...@infracaninophile.co.uk



signature.asc
Description: OpenPGP digital signature


Re: Cronjob Cvsup - What?

2013-01-27 Thread Zyumbilev, Peter


On 27/01/2013 12:46, Matthew Seaman wrote:

   Cheers,
 
   Matthew
 


Matthew,

Fantastic howto ! Thanks ! Really a good job...as usual :-)

Peter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob Cvsup - What?

2013-01-27 Thread MFV
Hello Matthew,

Thanks for an outstanding piece of documentation.  It resolves a number of 
concerns I had and convinced me to move from portsnap where I discovered an 
apparent bug  that gave me security concerns.  More specifically I manually 
edited /usr/ports/UPDATING and portsnap did not recognise the change and 
download a proper copy.

The only downside with svn seems to be the 728 MB footprint.

Cheers ...

Mark

On Sun, 27 Jan 2013 05:46:23 Matthew Seaman wrote:
 On 27/01/2013 08:35, Zyumbilev, Peter wrote:
  Last 10 years I am using cvsup. Any good guide for the transition to
  subversion  ?
 
 Most of the guides around freebsd.org are aimed at developers who will
 be using SVN read-write.  For simple read-only use (ie. not checking
 anything into the repository) the following should suffice:
 
   0) Install svn
 
  It isn't part of the base system, and it has too many external
  dependencies with different licensing terms for it to be bought
  in easily.  There's been some discussion about this, but it hasn't
  happened yet.  If it did, the imported version would be fairly
  minimal, and anyone wanting to use it for serious development
  would probably just grab the ports version anyhow.
 
  If all you want to do is pull down a copy of the sources then you
  can turn off most of the options to reduce the fairly large
  dependency tree to something more manageable:
 
  BDB=off: Berkeley Database
  BOOK=off: Install the Subversion Book
  ENHANCED_KEYWORD=on: Enhanced svn:keyword support
  FREEBSD_TEMPLATE=on: FreeBSD Project log template
  GNOME_KEYRING=off: Build with GNOME Keyring auth support
  KDE_KWALLET=off: Build with KDE KWallet auth support
  MAINTAINER_DEBUG=off: Build debug version
  MOD_DAV_SVN=off: mod_dav_svn module for Apache 2.X
  MOD_DONTDOTHAT=off: mod_dontdothat for Apache 2.X
  NEON=off: WebDAV/Delta-V repo access module (neon)
  P4_STYLE_MARKERS=off: Perforce-style conflict markers
  SASL=off: SASL support
  SERF=on: WebDAV/Delta-V repo access module (serf)
  STATIC=off: Build static version (no shared libs)
  SVNAUTHZ_VALIDATE=off: install svnauthz-validate
  SVNMUCC=off: Install Multiple URL Command Client
  SVNSERVE_WRAPPER=off: Enable svnserve wrapper
  TEST=off: Run subversion test suite
 
  There is the new devel/subversion-static port which does all that,
  and compiles subversion with static linkage so it has *no* runtime
  dependencies on anything else.  The disadvantage here is that if
  there is, say, a security hole discovered in the one of the
  libraries subversion links against, you won't secure the
  statically linked copy of subversion simply by updating to a fixed
  version of the shlib.  subversion-static is really only intended
  for providing a one-off binary package that people can download
  and install in order to bootstrap a more standard FreeBSD
  environment.
 
   1) Choose a SVN mirror close to you.  Currently there are two choices:
 
 svn0.us-west.FreeBSD.org  -- Western USA
 svn0.us-east.FreeBSD.org  -- Eastern USA
 
  Use whichever one gives you best performance.  Certainly from
  Europe at the moment us-east seems to be the best choice.
 
  The number of SVN mirrors and their global coverage should increase
  over time, but it will never need as many servers as the old cvsup
  network.
 
  The canonical list of SVN mirrors is here:
 
 
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/svn-mirrors.html
 
   2) Choose a protocol for access the SVN servers.  Your choices in
  order of preference are
 
  svn://
  https://
  http://
 
  Use svn:// for best performance.  If you're concerned about MITM
  attacks injecting trojans into the FreeBSD sources, then use
  https and be sure to verify the certificate hashes on first
  connection.  Otherwise, if you're stuck behind a restrictive
  firewall, use http://
 
   3) Choose which branch you want to mirror.  It's relatively easy to
  switch between branches and doesn't involve downloading the entire
  contents of /usr/src all over again if you change your mind.
  However right now, the viable choices are
 
 head --- Current, the bleeding edge, really only suitable
  for development purposes
 
 stable/9 --- 9-STABLE  Still a rapidly changing development
  branch, but not quite so close to the edge, and
  with less bleeding involved.
 
 stable/8 --- 8-STABLE  Ditto.
 
 releng/9.1 --- 9.1-RELEASE  This tracks any security patches to
  version 9.1.  However, in this case you would be
  better advised to use freebsd-update(8) to maintain
your /usr/src directory tree instead.
 
 Similarly 

Re: Cronjob Cvsup - What?

2013-01-27 Thread Steve O'Hara-Smith
On Sun, 27 Jan 2013 09:51:12 -0500
MFV mrk...@acm.org wrote:

 The only downside with svn seems to be the 728 MB footprint.

With hard disc space running at around 10c per gigabyte it's a
minor issue.

-- 
Steve O'Hara-Smith st...@sohara.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob Cvsup - What?

2013-01-27 Thread Robert Huff

Steve O'Hara-Smith writes:

   The only downside with svn seems to be the 728 MB footprint.
  
   With hard disc space running at around 10c per gigabyte it's a
  minor issue.

Doesn't that depend on whose money it is?


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob Cvsup - What?

2013-01-27 Thread Warren Block

On Sun, 27 Jan 2013, Matthew Seaman wrote:


 2) Choose a protocol for access the SVN servers.  Your choices in
order of preference are

svn://
https://
http://

Use svn:// for best performance.  If you're concerned about MITM
attacks injecting trojans into the FreeBSD sources, then use
https and be sure to verify the certificate hashes on first
connection.  Otherwise, if you're stuck behind a restrictive
firewall, use http://


HTTPS is preferred.  The SVN mirrors section of the Handbook will soon 
reflect that.


Performance should not be very different from svn://.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob Cvsup - What?

2013-01-27 Thread RW
On Sun, 27 Jan 2013 09:51:12 -0500
MFV wrote:

 Hello Matthew,
 
 Thanks for an outstanding piece of documentation.  It resolves a
 number of concerns I had and convinced me to move from portsnap where
 I discovered an apparent bug  that gave me security concerns.  More
 specifically I manually edited /usr/ports/UPDATING and portsnap did
 not recognise the change and download a proper copy.

I don't see why that's a problem. The function of portsnap update is
to update files in the tree that have been updated, deleted or added
in the repository. Resynchronising the tree and it's metadata with the
snapshot is what portsnap extract is for.  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob Cvsup - What?

2013-01-26 Thread Lowell Gilbert
W. D. w...@us-webmasters.com writes:

 According to:

   http://www.freebsd.org/news/2012-compromise.html

 Cvsup is deprecated.  If I have a Cron entry like:

 #-
 #Min   HrDOM   Mnth  DOW   Command

 #   At 3:46 in the morning, everyday, as root, update the ports tree:
 46 3 * * * /usr/local/bin/cvsup   -h   
 cvsup12.FreeBSD.org  /usr/share/examples/cvsup/ports-supfile 
 #-

 What should I use: freebsd-update, Subversion, portsnap, or what?

 What would be the best Cron command to keep ports updated on a daily
 basis?

portsnap is almost certainly the best answer for you.

freebsd-update is for the base system, not ports. 

If you needed version control features on your ports tree (especially if
you were regularly contributing changes to ports), getting and updating
your tree through subversion would have some extra features you might
want, but it doesn't sound as if that is the case for you.

Unless you have a specific reason why portsnap doesn't fit your use
case, it's definitely the way to go for just keeping a ports tree
updated regularly.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-11 Thread Danijel Tasov
Paul Chvostek wrote:
   0 1 28-31 * * test `date -v+1d '+%d'` -eq 1  /path/to/script

You have to escape the percent sign in crontab with \:

run.  The entire command portion of the line, up to a newline
or % character, will be executed by /bin/sh or by the shell
specified in the SHELL variable of the cronfile.
Percent-signs (%) in the command, unless escaped with
backslash (\), will be changed into newline characters, and
all data after the first % will be sent to the command as
standard input.

bye,
Da.Ta

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-09 Thread Jonathan McKeown
On Monday 08 June 2009 17:37:14 Jerry McAllister wrote:
 On Mon, Jun 08, 2009 at 06:31:57PM +0400, Peter Andreev wrote:
  may be this solution will help you:
[snip]
 
  * * 31 1/2 *
  * * 30 4/2 *
  * * 28 2 *

This isn't right, surely? It goes wrong in August and stays wrong for the rest 
of the year. The 31-day months are 1,3,5,7,8,10,12.

 Don't forget leapyear.

Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-09 Thread Peter Andreev
yes, you're right, thank you/ the right version will be:

* * 31 1,3,5,7,8,10,12 *
* * 30 4,6,9,11 *
* * 28,29 2 *

2009/6/9 Jonathan McKeown j.mcke...@ru.ac.za

 On Monday 08 June 2009 17:37:14 Jerry McAllister wrote:
  On Mon, Jun 08, 2009 at 06:31:57PM +0400, Peter Andreev wrote:
   may be this solution will help you:
 [snip]
  
   * * 31 1/2 *
   * * 30 4/2 *
   * * 28 2 *

 This isn't right, surely? It goes wrong in August and stays wrong for the
 rest
 of the year. The 31-day months are 1,3,5,7,8,10,12.

  Don't forget leapyear.

 Jonathan
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-09 Thread Jos Chrispijn

Mike Jeays wrote:

Isn't that a linuxism? Looking at the man pages for the date command for 
FreeBSD, it looks as if 'date -v+1d' will return tomorrow's date (and it does, 
I checked). The -d option is to do with daylight saving time.


- eot-

I see; will have that incorporated in the script.
Thanks for sharing,
Jos


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-08 Thread Neal Hogan
On Mon, Jun 8, 2009 at 7:55 AM, Jos Chrispijn j...@webrz.net wrote:

 I would like to execute a script on every last day of the month in my
 crontab.
 Can someone tell me how I should solve that as it doesn't know which month
 day is the last day of the month?


If it really needs to be done on the last day of each month (eg, the 28th of
Feb . . . the 31st of Oct . . . etc.), I suppose you could set up 12
different jobs. Be aware of the dreaded leap year, though!



 Solving this in the script to be executed is no option.

 Thanks, Jos

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-08 Thread Steve Bertrand
Jos Chrispijn wrote:
 I would like to execute a script on every last day of the month in my
 crontab.
 Can someone tell me how I should solve that as it doesn't know which
 month day is the last day of the month?
 Solving this in the script to be executed is no option.

I've done this before. My script was in Perl.

Essentially, the script ran once every day. At the top of the script, it
did a DateTime check to see if tomorrow was the 1st of the month.

If it was, the script proceeded, else it exited.

Steve


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Cronjob

2009-06-08 Thread Wojciech Puchar

put 12 lines, for each month and with the last day.

On Mon, 8 Jun 2009, Jos Chrispijn wrote:

I would like to execute a script on every last day of the month in my 
crontab.
Can someone tell me how I should solve that as it doesn't know which month 
day is the last day of the month?

Solving this in the script to be executed is no option.

Thanks, Jos

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-08 Thread Paul Chvostek
Hi Jos,

On Mon, Jun 08, 2009 at 02:55:56PM +0200, Jos Chrispijn wrote:
 
 I would like to execute a script on every last day of the month in my 
 crontab.
 Can someone tell me how I should solve that as it doesn't know which 
 month day is the last day of the month?
 Solving this in the script to be executed is no option.

The only solutions I see are the three-cronjob approach:

  0 1 31 1,3,5,7,8,10,12 * /path/to/script
  0 1 28 2   * /path/to/script
  0 1 30 4,6,9,11* /path/to/script

Alternately, you could do this with a single cronjob by putting a little
scripting intelligence into the crontab itself:

  0 1 28-31 * * test `date -v+1d '+%d'` -eq 1  /path/to/script

That may be your easiest option.  The script only gets run on the
correct dates, but the cron job still gets run more frequently.

p

-- 
  Paul Chvostek p...@it.ca
  it.canadahttp://www.it.ca/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-08 Thread Peter Andreev
may be this solution will help you:

* * 31 jan,mar,may,jul,aug,oct,dec *
* * 30 apr,jun,sep,nov *
* * 28 feb *

or:

* * 31 1/2 *
* * 30 4/2 *
* * 28 2 *

2009/6/8 Jos Chrispijn j...@webrz.net

 I would like to execute a script on every last day of the month in my
 crontab.
 Can someone tell me how I should solve that as it doesn't know which month
 day is the last day of the month?
 Solving this in the script to be executed is no option.

 Thanks, Jos

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-08 Thread Jerry McAllister
On Mon, Jun 08, 2009 at 06:31:57PM +0400, Peter Andreev wrote:

 may be this solution will help you:
 
 * * 31 jan,mar,may,jul,aug,oct,dec *
 * * 30 apr,jun,sep,nov *
 * * 28 feb *
 
 or:
 
 * * 31 1/2 *
 * * 30 4/2 *
 * * 28 2 *

Don't forget leapyear.

jerry


 
 2009/6/8 Jos Chrispijn j...@webrz.net
 
  I would like to execute a script on every last day of the month in my
  crontab.
  Can someone tell me how I should solve that as it doesn't know which month
  day is the last day of the month?
  Solving this in the script to be executed is no option.
 
  Thanks, Jos
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-08 Thread Warren Block

On Mon, 8 Jun 2009, Jerry McAllister wrote:


On Mon, Jun 08, 2009 at 06:31:57PM +0400, Peter Andreev wrote:


may be this solution will help you:

* * 31 jan,mar,may,jul,aug,oct,dec *
* * 30 apr,jun,sep,nov *
* * 28 feb *

or:

* * 31 1/2 *
* * 30 4/2 *
* * 28 2 *


Don't forget leapyear.


0 0 1 * *

-Warren Block * Rapid City, South Dakota USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-08 Thread Karl Vogel
 On Mon, 08 Jun 2009 14:55:56 +0200, 
 Jos Chrispijn j...@webrz.net said:

J I would like to execute a script on every last day of the month in my
J crontab.  Can someone tell me how I should solve that as it doesn't know
J which month day is the last day of the month?  Solving this in the script
J to be executed is no option.

   I have two scripts for this; one handles the last day of the month,
   and the other handles the last work/business day of the month.

   http://www.hcst.net/~vogelke/src/lastday/

-- 
Karl Vogel  I don't speak for the USAF or my company
Liberty means responsibility.  That is why most men dread it.  --G. B. Shaw
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-08 Thread Jos Chrispijn

Found another solution (for running @ 23:58):

58 23 * * * [ `date -d tomorrow +%d` -eq '01' ]  /myscript

thanks for all other suggestions,
Jos Chrispijn

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cronjob

2009-06-08 Thread Mike Jeays

-- 
Mike Jeays
http://www.jeays.ca
http://www.rotarycpmm.ca

On June 8, 2009 02:56:31 pm Jos Chrispijn wrote:
 Found another solution (for running @ 23:58):

 58 23 * * * [ `date -d tomorrow +%d` -eq '01' ]  /myscript

 thanks for all other suggestions,
 Jos Chrispijn

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 freebsd-questions-unsubscr...@freebsd.org

Isn't that a linuxism? Looking at the man pages for the date command for 
FreeBSD, it looks as if 'date -v+1d' will return tomorrow's date (and it does, 
I checked). The -d option is to do with daylight saving time.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cronjob doesn't run???

2004-12-27 Thread Tom Vilot
Might be a path issue.
I had similar issues with cron (/etc/periodic/daily) if I didn't use a 
full path to the binaries.

:c(

i have an odd problem with this cronjob,
#!/bin/sh
cd /home/timothy
burncd -f /dev/acd0c blank
tar -zcvf  ./burning/thunderbird.tar.gz ./.thunderbird/*
tar -zcvf ./burning/Projects.tar.gz ./Projects/*
tar -zcvf ./burning/cvsd.tar.gz /usr/local/cvsd/*
mkisofs -L -l -relaxed-filenames -o tmp.iso burning
burncd -e -f /dev/acd0c data tmp.iso
rm tmp.iso
rm burning/*
n# ls -l /etc/periodic/daily/Backup
-rwxr-xr-x  1 root  wheel  323 Dec 27 22:42 /etc/periodic/daily/Backup
as you can see it's not a permissions issue. the job must do 
something, because i end up with a cdrw i can't mount :\
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]