Yes, the "related system"...is running the same OS.
The OS is quite old - UnixWare 1.1
I found an explanation for the odd value of the TZ variable.
Turns out this syntax is a characteristic of non-POSIX TZ values;
for whatever reason the leading colon needs to be there.
If the TZ does not have the leading colon, the expression is ignored and I simply get GMT (which does not manifest the 'at' problem). If the TZ value does have the leading colon (and thereby impacts the system time) I will get the incorrect 'at' behavior.
I found an explanation for the odd value of the TZ variable.
Turns out this syntax is a characteristic of non-POSIX TZ values;
for whatever reason the leading colon needs to be there.
Hmmm... a standard for non-standard systems. That's deep.
That is actually the System V release 4 version of TZ. I have been referring to the SunOS man page which documents the colon. But I had trouble understanding it. Now I have looked at the man page for your system. It looks like Sun tweaked the TZ concept a little (big surprise there) and didn't update the man page well. Now I finally understand that colon. You can ignore my second suggestion in my previous post. I now modify it to:
TZ=:US/Eastern
However according to your man page that would behave identically to TZ=:/usr/lib/locale/TZ/US/Eastern
which is what you have.
Sorry for the delay - I couldn't get access to the system for a few days.
I retried stuff again and the output is appended below.
If you have an epiphany that makes sense out of this, I'd be most obliged.
Thanks, in any event, for your responses and attempts to help.
---------------------------------------
---------------------------------------
Final summary ....
CASE 1: TZ=:US/Eastern
------------------------
Basically if TZ is defined such as ":US/Eastern" then `date` works fine,
but the `at` command is scheduled exactly 2 hours late.
Zdump cannot resolve the ":US/Eastern" syntax.
Note that after it says it cannot find ":US/Eastern" it seems to print out
the time as GMT.
btd33m01!root[10] env - /usr/bin/ksh
# env
_=/bin/env
PWD=/
# export TZ=:US/Eastern
# date
Wed Aug 3 15:35:41 EDT 2005
# /usr/sbin/zdump -v -c 2007 $TZ | tail
/usr/sbin/zdump: Can't open :US/Eastern: No such file or directory
:US/Eastern Wed Aug 3 19:36:54 2005
CASE 2: TZ=US/Eastern
------------------------
If TZ is defined without the colon, i.e. "US/Eastern" then `date` is wrong.
The time is reported as GMT - the same as if TZ is not defined.
However, the `at` symptom disappears - any job scheduled is
set to the appropriate GMT time, with no 2 hour discrepancy.
And zdump happily parses the TZ, whether defined as "US/Eastern"
or as "/usr/lib/locale/TZ/US/Eastern"
Last edited by Perderabo; 08-04-2005 at 05:24 PM..
Reason: add code tags for readability
None of that really helps very much.
TZ=US/Eastern
TZ=sjssjjdjdjdeerr
and TZ=any-other-illegal-string
should all give the same results. What happened to case zero (TZ=:/usr/lib/locale/TZ/US/Eastern )? All three commands should find your zone file if you use that. Your zdump of the default GMT timezone file doesn't tell me much. Your at command works when you use it. It's the other timezone file that I think is screwy. In the SunOS source code for at.c, the last operation done on the constructed time is:
if (localtime(&when)->tm_isdst) when -= (timezone-altzone);
Your case 1 does suggest that the commands themselves may be at different rev levels. Have you compared the executables between the systems that work and the systems that fail? This is a new symptom that may or may not be related to the misbehavior when you use TZ with a full path. But to look at this... you might have a file /usr/include/tzfile.h that defines a constant called TZDIR. See if you can find the value of that constant.
Team,
Hope you all are doing fine
I have one admin server which is being used dedicately to run cron jobs on hourly basis, fetching the details from Database which is in a different server.These cronjob are run on every hourly/5 minutes basis depending as per end user requirement.The script... (12 Replies)
i have a job scheduled in crontab. The problem is, it is not running automatically as per the time scheduled. But runs when executed manually. What would be the problem? Help me with this please. (6 Replies)
Hi,
I want my unix script to run as a scheduled job such that the script is invoked once every 15 minutes. Is there any way to achieve this other than running the script as a cron job? (2 Replies)
I have scheduled couple of shell scripts to run using 'at' command.
The o/p of at -l is:
$ at -l
1320904800.a Thu Nov 10 01:00:00 2011
1320894000.a Wed Nov 9 22:00:00 2011
1320876000.a Wed Nov 9 17:00:00 2011
$ uname -a
SunOS dc2prcrptetl2 5.9 Generic_122300-54 sun4u sparc... (2 Replies)
Hi,
Though this is a unix forum mainly, am posting this oracle query here hoping to get a resolution.
I have set up two scheduled jobs in oracle 11g for executiong a procedure in specific time intervals. One as Hourly and other as minutely.
But the scheduled jobs are not running as per... (2 Replies)
Hi
I need to run a script every five minutes and it should run between 07-15 hours all days.
How i can achieve this...
i tried like this
*/5 07-15 * * * /scripts/CreateFtpData.sh
It throws an error... (1 Reply)
I have a lot of jobs scheduled using at command.
at -l gives only the job names and time ... how do i know which script is associated with which jobid.
Thanks. (1 Reply)
Hello,
I have problem in executing a shell script. When the shell script is executed at the shell prompt the script works successfully but when the same script is run as a cron job it fails to execute the files called within the shell script.
I have scheduled the job in my crontab file as
... (6 Replies)
Hi All,
i am trying to automate a process and have to create a unix script like wise. I have a scenario in which i need to automate a file movement. Below are the steps i need to automate.
1. Check whether a file (Not Fixed name-Pattern search of file say 'E*.dat') is present in a... (2 Replies)