Tech Support Guy banner
Status
Not open for further replies.

Automate Thunderbird email database backup

2K views 10 replies 3 participants last post by  JohnWill 
#1 ·
I'm trying to set up an automated backup of my Thunderbird database using my chosen backup program Beyond Compare. With that in mind, I've created a small batch file that shuts down Thunderbird, runs the backup application to create the snapshot, and then starts up Thunderbird again.

If I just run this batch job from a command prompt, it works perfectly. The batch shuts down TB, I get my backup data copy, and then the batch restarts TB.
I can run this batch job multiple times and it succeeds every time and works perfectly.

Now I just invoke the batch job from Windows 10's Task Scheduler and things go south. The TB shutdown and backup go fine, and the batch job starts up TB. TB appears in the task scheduler window, but I never get the window, and I have to open Task Manager and kill the copy of TB and manually start it to get the desktop window back.

Can anyone tell me what is happening and how to make this automation work?

Contents of my batch file.

@Echo off
for /l %%x in (1, 1, 10) do (
rem echo Loop iteration count %%x
taskkill /im thunderbird.exe
)
taskkill /f /im thunderbird.exe
timeout 10
start "" "C:\Program Files\Beyond Compare 4\BCompare.exe" "@D:\BC_Sync\Thunderbird Snapshot to H.txt" /wait
timeout 10
start "" "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe"


TB Appears in my task list, just doesn't actually product the desktop window!

Font Rectangle Circle Parallel Magenta
 
See less See more
1
#6 ·
I did fire it off without the start, by itself in a task it doesn't get a window. I suspect that running it with task manager is the issue, but I'm not sure how to change that.
 
#7 ·
I tried to replicate this whole process using Thunder Bird and Beyond Compare 4 in my sandbox and it works fine using task scheduler, which means it is likely a setting in your environment/task scheduler.

The only time I can replicate your issue, is if I try to run the task as a different user to the one I'm logged in to. When I do this, Thunder Bird shows up in Task Manager under"Background Process" rather than "Apps". Could this be the same problem you are facing?
 
#8 ·
Well, that's what is happening, but I'm running it under my logged in user ID and password. I actually looked around to see if there was a setting in Task Manager that I was missing, but I sure can't find anything. I believe you're right as when I run the batch file, I see the BC backup happening, but I don't see anything when task manager runs it.

When I look at how the execution is invoked in Task Manager, I can't see anything that I can change to make this happen.
 

Attachments

#10 ·
Ah, I was midway typing a response asking you to check those setting there :p

Is that all working as it should now then? or are there still issues you need ironing out?
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top