Subject: crontab entry environment variables [PSARC/2007/503 FastTrack timeout 09/10/2007] To: PSARC-ext@Sun.Com Cc: chris@thegerhards.com Bcc: one-pager-list@sac.sfbay one-pager-log@sac.sfbay sac-bar@sac.sfbay I'm sponsoring this OpenSolaris case for Chris Gerhard. It has some possible standards impact but I believe based on previous discussions this should be acceptable, if it wasn't for the standards impact this would likely have been self-review. Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI This information is Copyright 2007 Sun Microsystems 1. Introduction 1.1. Project/Component Working Name: crontab entry environment variables 1.2. Name of Document Author/Supplier: Author: Chris Gerhard 1.3 Date of This Document: 03 September, 2007 4. Technical Description This project proposes support for and use of TZ, SHELL and HOME variables as per crontab(4) entry varaiables, these are the only ones that change the way cron behaves. All others can be achieved via having the entry set the variable (SHELL is the weakest of the three to change as it only saves on exec). HOME solves the problems associated with NFS and cronjobs where a users home directory is not available when the entry runs (as in the case with secure NFS). TZ obviously sets the time zone when the entry is valid. Allowing jobs to run in any time zone. The variables continue to effect all entries below them until new entries are listed in the file. Entries would run with a HOME directory set to the one listed and at times that are correct according to the TZ value and with a shell specified by SHELL. Setting any other variable results in an error when you try and save the crontab file. Use of this facility is controlled by an entry in the already existing /etc/default/cron [ the project team is aware that ideally this and the existing cron(1M) use of this file should migrate to SMF properties but that is not this case ]. If there is an entry of the form: ALLOW_EXTENSIONS=YES in the file then the entries are allowed otherwise cron and crontab behave as it do now and crontab will not let you add the lines and cron will not process them, instead treating them as errors. The one problem area would be if an Admin removed the entry from /etc/default/cron while there were crontab files that contained those entries. When cron was restarted all the lines would be reported as in error and potentially cron jobs could run at the wrong times with the wrong shell and wrong HOME directory. OpenSolaris distributions would decide whether they wish to allow the extensions or not by default and provide an /etc/default/cron with ALLOW_EXTENSIONS set to YES or NO depending on that decision. This case declares the default for the Solaris distribution to be YES. All the functionality defined in this case is exported as Committed interfaces with a release binding of patch. Updated man pages are in the materials directory. 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: ON 6.5. ARC review type: FastTrack 6.6. ARC Exposure: open