- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cron job executed time
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2003 09:50 PM
08-07-2003 09:50 PM
cron job executed time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2003 09:57 PM
08-07-2003 09:57 PM
Re: cron job executed time
if [ -r /etc/TIMEZONE ]
then
. /etc/TIMEZONE
else
TZ= EAT-8
export TZ
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2003 10:31 PM
08-07-2003 10:31 PM
Re: cron job executed time
TZ = EAT-8
export TZ
echo $TZ > a.log
...
After the a.sh was run by cron, I view the
a.log shows the EEST? What's happend on it?
Why it is not show EAT-8?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2003 10:51 PM
08-07-2003 10:51 PM
Re: cron job executed time
$ cat a.sh
TZ=EAT-8
export TZ
echo $TZ >a.log
$ sh a.sh
$ cat a.log
EAT-8
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2003 10:57 PM
08-07-2003 10:57 PM
Re: cron job executed time
I also get the right result while run the
a.sh directly, but get the fault result while
a.sh was run in cron job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2003 11:00 PM
08-07-2003 11:00 PM
Re: cron job executed time
Try adding this
--------------------
TZ = EAT-8
export TZ
echo $TZ > a.log
date >> a.log
. /etc/TIMEZONE
date >> a.log
--------------------
and see what happens, I have tested it via cron and works OK:
EAT-8
Fri Aug 8 14:51:00 EAT 2003
Fri Aug 8 08:51:01 METDST 2003
Regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2003 11:06 PM
08-07-2003 11:06 PM
Re: cron job executed time
TZ = EAT-8
export TZ
echo $TZ > a.log
date >> a.log
--------------------
The ouputs is:
EEST
Fri Aug 8 14:51:00 EAT 2003
Since the /var/adm/cron/log logs the date time
are belong EEST, which is not mine want. I would /var/adm/cron/log to show correct Timezone "EAT-8". But the result always shows the "EEST", how to fix it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2003 11:23 PM
08-07-2003 11:23 PM
Re: cron job executed time
I have just tested this via cron:
--------------------
TZ=EAT-8
export TZ
echo $TZ > a.log
date >> a.log
TZ=EEST
export TZ
echo $TZ >> a.log
date >> a.log
---------------------
and the log file contains:
---------------------
EAT-8
Fri Aug 8 15:14:01 EAT 2003
EEST
Fri Aug 8 07:14:01 EEST 2003
---------------------------
Difference of 8 hours.
What about your /etc/TIMEZONE?
Regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2003 12:45 AM
08-08-2003 12:45 AM
Re: cron job executed time
EAT-8
This is a strange issue. Does any has experience on this? While I was installed os is bundled on EEST, but I had been modify the /etc/TIMEZONE and TZ to EAT-8, why the cron job still known the ESST and logs error time to /var/adm/cron/log?