scheduled scripts do not run but DO run when by clicking on them either in Macrium GUI or Run...


Author
Message
Dennis Foreman
Dennis Foreman
Junior Member
Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)
Group: Forum Members
Posts: 49, Visits: 100
The script has a Start-Process command inserted immediately preceding the call to the backup function. It runs perfectly when I run it manually, but when it runs by schedule, no errors appear and Windows says the task is running, but the Start-Process doesn't happen.
The Start-Process runs a windows batch file reminding me to plug-in the backup device.
jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)
Group: Forum Members
Posts: 14K, Visits: 84K
As a test, modify the batch file you’re calling to do something you’ll be able to observe after the fact rather than just throwing a prompt. For example, have it create a new empty folder somewhere.

If that works, and given that you mentioned that Reflect says the task is “running” rather than that it “completed successfully”, then I suspect the issue is that you’re expecting a script that runs in a background context to surface a prompt in the logged-on user’s session. That doesn’t work, for both security and practical reasons — for example, if this were a server that allowed multiple simultaneous user sessions, how would your script “know” whose session should see the prompt? I suspect what’s happening is that the script is indeed generating that prompt, but it exists within that background context you can’t interact with, and that’s why Reflect shows it as running but not completing. It’s stuck waiting for input in a context that you can’t access.
Edited 21 June 2023 12:54 PM by jphughan
Dennis Foreman
Dennis Foreman
Junior Member
Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)Junior Member (53 reputation)
Group: Forum Members
Posts: 49, Visits: 100
jphughan - 21 June 2023 12:54 PM
As a test, modify the batch file you’re calling to do something you’ll be able to observe after the fact rather than just throwing a prompt. For example, have it create a new empty folder somewhere.

If that works, and given that you mentioned that Reflect says the task is “running” rather than that it “completed successfully”, then I suspect the issue is that you’re expecting a script that runs in a background context to surface a prompt in the logged-on user’s session. That doesn’t work, for both security and practical reasons — for example, if this were a server that allowed multiple simultaneous user sessions, how would your script “know” whose session should see the prompt? I suspect what’s happening is that the script is indeed generating that prompt, but it exists within that background context you can’t interact with, and that’s why Reflect shows it as running but not completing. It’s stuck waiting for input in a context that you can’t access.

That makes sense. And I think that means I have to abandon using the Macrium scheduler and run the script from the Windows scheduler. As I mentioned in a different post, the batch file is needed to pop a window reminding me not to turn off the external (backup) drive or reboot. That's unfortunate, because Acronis doesn't have this context problem and runs my batch file flawlessly. But I wantto stop using (and paying) for Acronis, which has other problems (such as 40 hours to do a consolidation) of a 200GB backu.
jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)
Group: Forum Members
Posts: 14K, Visits: 84K
Consolidation time can increase over time as the Synthetic Full gets increasingly fragmented, but 40 hours seems absurd. I’ve seen 150 GB Incrementals run for up to 8 hours before I create a new Full since that’s too long for the overall backup window.

I haven’t worked with Acronis in a very long time, so I don’t know what it’s doing differently, but if it’s running in the user’s context, then the downside of that is that logging off will terminate the process. Background tasks run as long as Windows is running. Admittedly not a major issue/distinction for home users, but it can matter for mostly unattended systems like servers.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Login

Explore
Messages
Mentions
Search