Operating System Time vs. Macro Sheduler Time

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
nbell
Newbie
Posts: 11
Joined: Mon Nov 11, 2002 2:51 pm
Location: China
Contact:

Operating System Time vs. Macro Sheduler Time

Post by nbell » Sun Jul 08, 2007 1:06 am

I am using MS Ver 7.4.009 on one of our computers.

I have written one script that opens a new Excel file at 6:00 AM in the morning and a second script that saves the file every fifteen minutes throughout the day so the data the employee enters during the day won't be lost due to a power failure (we work in China) or some other user screw up!.

Both scripts works just fine. When MS creates the new file at 6:00 AM the time code on the file is correct with the system clock.

After the first script managed save, the time stamp on the file has changed with the time being three hours ahead of the system clock and and the date being one full day ahead.

I have put the system through many tests with other time related functions (other than MS) and I don't find this problem. Only when the file is saved through MS. Another thing that is interesting, once it is saved by MS with the incorrect time stamp and date stamp, I can use the save command in Excel and the file time stamp and date stamp are still incorrect.

Here is a copy of the save script... very simple.... It auto starts with the Macro's property's time control and ends the same way.

//To Periodically Save Existing Gate Report File
//every 15 minutes.

Code: Select all

Label>Loop
SetFocus>Microsoft Excel -*
Wait>3.0
Press Alt
Send>f
Release Alt
Send>s
Wait>900
Goto>Loop

I hope someone has some idea as to why this is happening.

Thank You!
May I live my life so the worth of my life
Far outlasts the Years of my life!

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Sun Jul 08, 2007 3:12 am

Does this all happen on the same PC, or is there a networked drive, or maybe FTP involved somehow?

nbell
Newbie
Posts: 11
Joined: Mon Nov 11, 2002 2:51 pm
Location: China
Contact:

Macro Scheduler and Windows Automation Forum Index

Post by nbell » Sun Jul 08, 2007 3:54 am

Yes it does happen all the time!

There are two networked (Mapped Drives) involved because the data is being saved on a different computer. This computer is at our security gate and is not as safe as the one we use to store our data on.

All our computers are networked but only two use Macro Scheduler. One used the version 7 (the computer with the problem) and another computer uses the latest Ver 9

Thank you for your come back on this.

Regards!
May I live my life so the worth of my life
Far outlasts the Years of my life!

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Sun Jul 08, 2007 4:16 am

Are the clock/time settings the same on ALL the PC's that are involved in this process?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Jul 08, 2007 8:21 am

Your script is simply mimicing a user to save the file. Macro Scheduler is not doing anything with the time and is not doing the save. Excel is. So this is not a Macro Scheduler problem.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts