Sponsored Content
Top Forums UNIX for Dummies Questions & Answers AT job scheduled exactly 2 hours late Post 80238 by bohunk24 on Thursday 4th of August 2005 03:09:15 PM
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
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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
FUNCTION::CTIME(3stap)					      Time utility functions					    FUNCTION::CTIME(3stap)

NAME
function::ctime - Convert seconds since epoch into human readable date/time string SYNOPSIS
ctime:string(epochsecs:long) ARGUMENTS
epochsecs Number of seconds since epoch (as returned by gettimeofday_s) DESCRIPTION
Takes an argument of seconds since the epoch as returned by gettimeofday_s. Returns a string of the form "Wed Jun 30 21:49:08 1993" The string will always be exactly 24 characters. If the time would be unreasonable far in the past (before what can be represented with a 32 bit offset in seconds from the epoch) an error will occur (which can be avoided with try/catch). If the time would be unreasonable far in the future, an error will also occur. Note that the epoch (zero) corresponds to "Thu Jan 1 00:00:00 1970" The earliest full date given by ctime, corresponding to epochsecs -2147483648 is "Fri Dec 13 20:45:52 1901". The latest full date given by ctime, corresponding to epochsecs 2147483647 is "Tue Jan 19 03:14:07 2038". The abbreviations for the days of the week are 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', and 'Sat'. The abbreviations for the months are 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', and 'Dec'. Note that the real C library ctime function puts a newline (' ') character at the end of the string that this function does not. Also note that since the kernel has no concept of timezones, the returned time is always in GMT. SystemTap Tapset Reference June 2014 FUNCTION::CTIME(3stap)
All times are GMT -4. The time now is 03:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy