Renaming Macros not scheduled

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Renaming Macros not scheduled

Post by Bob Hansen » Tue Sep 24, 2002 4:08 am

I recently renamed some macros using the Edit Rename function. It all appeared to be good, until I noticed a few days later that some of my scheduled macros were not running. I was getting a message that the macro file could not be found.

I renamed the macros back to their original name, and that fixed the problem.

Will version 7 fix this?

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

Post by Marcus Tettmar » Tue Sep 24, 2002 9:11 am

Check the file attributes for the file macros.dat - has it been write protected?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Sep 24, 2002 2:05 pm

NO, macros.dat is not write protected, but I did see this:

I renamed two files. Looked inside macros.dat and the changes did not happen. The time/date of macros.dat did not change. I then QUIT Macro Scheduler and restarted it. The changes to macros.dat were now in place.

So I tried this again and found the same thing. But I am curious about where these changes get held until MSched is restarted? I renamed two files again. I did a refresh in the folder for macros.dat, no date/time change. Sorted by date, and saw no other temp file that had changes? Opened macros.dat and it was not changed with the two new file names. I quit MSched, opened macros.dat and the changes were there. :?: Where are these changes being held? In the registry? How long will they be held? Will they stay until I restart Macro Scheduler? What if I shut down before restarting Macro Scheduler? :?:

:arrow: Anyway, it looks like the changes will not take effect unless Macro Scheduler is closed and reopened. Knowing this, I can now work around it, but it seems like it should happen immediately. By the way, this was with version 6.2.3.

Thanks for listening.

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

Post by Marcus Tettmar » Tue Sep 24, 2002 2:11 pm

The contents of macros.dat are held in memory and only written to on exit. But this doesn't mean the changes won't be noticed - all the data is held in memory, modified when any changes are made, and the file itself is only there so that Macro Scheduler remembers everything between sessions (obviously) so only needs to be written on exit.

If you rename a macro it should rename immediately and certainly this is the case when I try it - it all works fine.

You just won't see any changes to macros.dat until you close the app.

Perhaps Macro Scheduler didn't close down properly on the occasions that the changes were lost?

It seems rather odd - and I haven't been able to replicate a scenario where a renamed script is not renamed. Anyone else seen this? Some steps to replicate would be useful.

Marcus

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Sep 24, 2002 3:33 pm

The renaming of the file shows up immediately in the list of macro names. It was the actual running of the macros that did not happen on schedule.

Here are specific steps to reproduce the problem:

I will record my steps here right now as I make the changes:

1. Using Windows 98 SE, version 4.10.2222A
2. Using Macro Scheduler 6.2.3vb. Macro files (only) are located on a server location vs. a local machine. Macro Scheduler, with macros.dat is on local machine.
3. Use editor (TextPad) to look at macros.dat, see original macro names. Close editor. Use Windows Explore to see macros.dat date/time is 9/24/02, 9:27 am.
4. Right click on systray icon for MSched, left click on Show
5. Have 5 groups (quantity in each group are:1,16,1,1,3).
6. Highlight first macro in group 5. Right Click it.
7. Left click on Rename.
8. Edit name in window from: "D5-OutlookBackups" to "OutlookBackups".
9. Click on OK to close editing window.
10. Do refresh in Windows Explore. macros.dat date/time the same at 9/24/02, 9:27 am (no change).
11. Use editor to look at macros.dat, see original macro names, the old name "D5-Outlook Backups" still there. Close editor.
12. Edit macro properties to change time to run in two minutes.
13. Use editor to look at macros.dat, see new macro name, and new time. macros.dat date/time are 9/24/02, 10:36 am.
12. Edit macro properties to change time back to original time.
14. Repeat steps 4-7 above.
15. Edit name in window from: "OutlookBackups" to "D5-OutlookBackups".
16. Click on OK to close editing window.
17. Do refresh in Windows Explore. macros.dat date/time the same at 9/24/02, 10:36 am (no change).
11. Use editor to look at macros.dat, see original macro names, the old name "OutlookBackups" still there. Again, filename did not change to "D5-OutlookBackups". Close editor.

Result: Renaming changes do not take effect in macros.dat immediately. Scheduling changes do take effect immediately.

I duplicated this on another machine, different macros, but same results. (Macro files were on local machine vs. server in this test). In one test I had the editor open on macros.dat and when I closed MSched I got a notification that macros.dat had been updated, did I want to refresh it? Answering YES, I saw that the new filename changes that I entered took place when MSched was closed. So that helps me understand the timing is at closing vs. when restarting. But still do not see immediate changes to renaming.

Hope this helps. Do you want copies of macros and/or macros.dat?

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