Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 19th, 2001, 07:35 AM
peterg's Avatar
peterg peterg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Alton,Hampshire,UK
Posts: 40 peterg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Question Environment values when run via cron?

Every week, I need to update an environment variable that tells script the date of the end-of-week. This is then read by a Perl script using:

Quote:
use Env qw { WEEKENDING };


Problem is, if the script is run as "nobody", how on earth can I set this variable, and who do I log on as to do it ? My workaround at the moment is to remember to manually edit the script

Reply With Quote
  #2  
Old July 20th, 2001, 10:03 AM
JSchoof JSchoof is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 82 JSchoof User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 46 sec
Reputation Power: 9
Toughy

Thats a toughy. The cron'ed job would , when spawned, pick up any settings in the users shell config file that the job was cron'ed under. So, if that user uses bash, you could make a setting in the .profile file for that user, and theoretically the job would pick it up.

I would just make a file in /etc that has the configuration directives in it. The job can read that in and rock out.

Josh

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Environment values when run via cron?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT