AT job scheduled exactly 2 hours late


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers AT job scheduled exactly 2 hours late
# 8  
Old 07-29-2005
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.
# 9  
Old 07-29-2005
Quote:
Originally Posted by bohunk24
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.

It looks like you have a zdump. Did you try that?
# 10  
Old 08-04-2005
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"
Code:
btd33m01!root[12] env - /usr/bin/ksh
# pwd
/
# date   
Wed Aug  3 19:44:10 GMT 2005
# echo $TZ

# export TZ=US/Eastern
# date
Wed Aug  3 19:44:36 GMT 2005
# /usr/sbin/zdump -v -c 2007 $TZ | tail 
US/Eastern  Sun Apr  3 06:59:59 2005 GMT = Sun Apr  3 06:59:59 2005 isdst=0 gmtoff=0
US/Eastern  Sun Apr  3 07:00:00 2005 GMT = Sun Apr  3 07:00:00 2005 isdst=0 gmtoff=0
US/Eastern  Sun Oct 30 05:59:59 2005 GMT = Sun Oct 30 05:59:59 2005 isdst=0 gmtoff=0
US/Eastern  Sun Oct 30 06:00:00 2005 GMT = Sun Oct 30 06:00:00 2005 isdst=0 gmtoff=0
US/Eastern  Sun Apr  2 06:59:59 2006 GMT = Sun Apr  2 06:59:59 2006 isdst=0 gmtoff=0
US/Eastern  Sun Apr  2 07:00:00 2006 GMT = Sun Apr  2 07:00:00 2006 isdst=0 gmtoff=0
US/Eastern  Sun Oct 29 05:59:59 2006 GMT = Sun Oct 29 05:59:59 2006 isdst=0 gmtoff=0
US/Eastern  Sun Oct 29 06:00:00 2006 GMT = Sun Oct 29 06:00:00 2006 isdst=0 gmtoff=0
US/Eastern  Mon Jan 18 03:14:07 2038 GMT = Mon Jan 18 03:14:07 2038 isdst=0 gmtoff=0
US/Eastern  Tue Jan 19 03:14:07 2038 GMT = Tue Jan 19 03:14:07 2038 isdst=0 gmtoff=0


Last edited by Perderabo; 08-04-2005 at 05:24 PM.. Reason: add code tags for readability
# 11  
Old 08-04-2005
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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Cron job scheduled is running once, but reports are generating twice

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)
Discussion started by: whizkidash
12 Replies

2. Shell Programming and Scripting

Scheduled job not running automatically in crontab

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)
Discussion started by: Santhosh CJ
6 Replies

3. Shell Programming and Scripting

run unix script as scheduled job

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)
Discussion started by: vignesh53
2 Replies

4. UNIX for Dummies Questions & Answers

at -l doesnt give details of the scheduled job. How to get the details?

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)
Discussion started by: superparticle
2 Replies

5. Programming

Oracle Scheduled job not running as per schedule.

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)
Discussion started by: suresh_kb211
2 Replies

6. Shell Programming and Scripting

Cron job for every five minutes and between hours

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)
Discussion started by: aemunathan
1 Replies

7. UNIX for Dummies Questions & Answers

Scheduled job

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)
Discussion started by: blackeyed
1 Replies

8. UNIX for Dummies Questions & Answers

problem when the script is scheduled to run as cron job

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)
Discussion started by: forumthreads
6 Replies

9. Shell Programming and Scripting

Conditional File Movement script scheduled using CRON job

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)
Discussion started by: imu
2 Replies
Login or Register to Ask a Question