APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > News Posts > cron crontab /etc/default/crontab vchown pcunix .! cronvchown pcunix .! crontab vchown pcunix .vchown pcunix .
Printer Friendly Version




News Group Posts

cron crontab /etc/default/crontab

vchown pcunix .! cron vchown pcunix .! crontab vchown pcunix .vchown pcunix .



From: Bela Lubkin <belal@sco.com>
Subject: Re: New /etc/default/cron from OSS642a - Cron supplement
Date: Tue, 17 Dec 2002 19:44:42 GMT
References: <fc5ef85a.0212160509.4e33e924@posting.google.com>
<20021216171623.GA10825@jpradley.jpr.com>
<fc5ef85a.0212170259.621d72f7@posting.google.com> alex stuart wrote: > Jean-Pierre Radley <jpr@jpr.com> wrote in message news:<20021216171623.GA10825@jpradley.jpr.com>... > > alex stuart typed (on Mon, Dec 16, 2002 at 05:09:58AM -0800): > > | It appears that during the install of the oss642a patch, a new > > | /etc/default/cron is installed. > <snip> > > But /etc/default/cron describes the purpose of each of those > > variables; which part of the text leaves you with "cannot > > determine what they are for"? > > Did it? I read only the lines that appeared to be shell envvar assignment > statements. I'm sorry I can't recheck this: I lost my job yesterday and > now don't have access to an OpenServer box. > > /etc/default/cron appeared to have the same syntax as a shell script. It > has lines like "OLDPARSING=YES" which appears to be an assignment; and > comments are introduced with a "#". When I ran a shell script from cron, > I could echo the PATH variable, set as above, but was unable to access > the NOTESHELL, INPUT and OLDPARSING envvars (l.h.sides?). I did not notice > a new man page distributed with the VOLS containing descriptions.












A new man page was not included, but comments were added to
/etc/default/cron, as JPR stated.  I just downloaded a fresh copy of
oss642a, extracted etc/default/cron from it, and here is an excerpt:
 #       NOTESHELL  - If set to YES, users submitting cron and at jobs are
  #                    notified if their login shell is different from the shell
  #                    that is used by cron to run jobs.

Setting this to NO turns off the annoying warning:

  "warning: commands will be executed using /bin/sh"

  #       INPUT      - If set to NO, the cron job input mechanism is disabled:
  #                    neither % nor \ are changed, removed, or otherwise treated
  #                    specially.
  #       OLDPARSING - If set to YES, \ and % in cron jobs are acted on in the
  #                    way they were up through OpenServer 5.0.6.

These control the parsing of lines in a crontab.  It is an attempt to
get control over an old feature that few people knew about, but which
caused trouble in some crontabs: '%' means `newline'.

There are three combinations:



  INPUT=YES, OLDPARSING=YES -- acts like cron in OSR506 and earlier.  If
  there are any '%' chars in a crontab command field, they are converted
  to newlines.  The command (everything before the first newline) is
  passed the rest as standard input.  So:

     * * * * * cat%foo%bar%

  means: ``every minute, run `cat`, passing as standard input a file
  with 2 lines containing the texts "foo" and "bar"''.

  =========================================================================

  INPUT=YES, OLDPARSING=NO (default configuration in OSR507 and oss642a)
  -- same, except now you can prevent the special interpretation of '%'
  chars with a backslash.  So:

    * * * * * echo foo%bar

  means: ``every minute, run `echo foo`, passing as stdin a file with
  one line containing "bar"''.  But:

    * * * * * echo foo\%bar

  means: ``every minute, run `echo foo%bar`''.

  NOTICE that this changes the meaning of '\' in existing crontabs.  To
  express a literal '\' you need two of them:

    * * * * * printf "This outputs\\ntwo lines."

  =========================================================================

  INPUT=NO, OLDPARSING=(ignored) -- characters '%' and '\' have no
  special meaning in crontab lines.  So:

    * * * * * echo foo%bar
    * * * * * echo foo\%bar

  means: ``every minute, run `echo foo%bar`'', and ``every minute, run
  `echo foo\%bar`''

>Bela<


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

Comments?



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar


cartoon
Versatile Site Map Generator $59.00
A1 Sitemap Generator

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

g_face.jpg

This post tagged:

       - Bela
       - SCO_OSR5




Unix/Linux Consultants

Skills Tests

Guest Post Here