Options for task/script to prompt for backup?


klepp0906

Well-known member
Local time
3:55 AM
Posts
52
OS
Windows 11
Rudimentary is being generous when it comes to describing my ability to mush together a functional .bat file or scheduled task. In short i'm looking for an answer as to whether this is possible, and if so how.

I have a robocopy script I run when i "feel" like it which actually backs up some quite important data. It all goes to an external hard drive which is essentially a desktop drive in a dock which I have to turn on.

Ive reached a point where having it backed up become important enough that I need to do it more regularly and as such I need to automate it. The major kink is the necessitating that i manually turn on the external drive.

I'd like to schedule a task to run the backup script on whatever schedule I decide on, but first notifying me somehow, or prompting me to turn on the external drive. I don't imagine using windows notifications is possible without some higher level programming knowledge so ultimately having a cmd window pop up that does not close and will not proceed without me having turned on the drive (and i imagine i'd have to manually advance the script at that point too).

Whats my best solution here?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    Intel i7 9900K
    Motherboard
    Asus Maximus X Formula
    Memory
    64GB G.Skill DDR4
    Graphics Card(s)
    EVGA 2080ti
    Monitor(s) Displays
    U2718Q
    Screen Resolution
    4K
    Hard Drives
    2TB Samsung 970 EVO Plus
    1TB Samsung 970 EVO Plus
    ~200TB worth of spinners in a DAS via LSI HBA
    PSU
    EVGA 1500 supernova
    Case
    Corsair 900D
    Cooling
    Custom Water
    Keyboard
    Razer Blackwidow Chroma v2
    Mouse
    Razer Naga Trinity
    Internet Speed
    Gigabit Fiber
    Browser
    Brave
It won't help with all of what you're asking, but since you already have a script with robocopy commands in it... you can add something to the top of that script that is a warning to turn on the drive and then have it 'pause' or 'timeout' for a specific amount of time to give you...

Examples:
You have to manually press a key to continue:
Batch:
ECHO.
ECHO WARNING
ECHO Turn on external drive
ECHO Press a key when drive is ready
pause

robocopy {yadda yadda}

Or have a 30 second timeout (just change the number to make it as long/short as needed)
Batch:
ECHO.
ECHO WARNING
ECHO Turn on external drive
ECHO 30 seconds remaining
ping 127.0.0.1 -n 30 > nul

robocopy {yadda yadda}
 

My Computers

System One System Two

  • OS
    Windows 11 Pro β
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion Laptop 15-eg0070wm
    CPU
    Intel® Core™ i7-1165G7
    Memory
    32 GB DDR4-3200 SDRAM
    Graphics Card(s)
    Intel® Iris® Xᵉ Graphics
    Screen Resolution
    1920x1080
    Hard Drives
    2TB PCIe® NVMe™ M.2 SSD
  • Operating System
    macOS Ventura
    Computer type
    PC/Desktop
    Manufacturer/Model
    Apple iMac 27" 5K (2017)
    CPU
    3.4 GHz Quad-Core Intel Core i5
    Memory
    40 GB 2400 MHz DDR4
    Graphics card(s)
    Radeon Pro 570 4 GB
    Monitor(s) Displays
    27" 5K, 34" UW
    Screen Resolution
    Mon 1: 5120 × 2880 Mon 2: 2560 x 1080
    Hard Drives
    32GB NVME, 1TB SSD
perfect, i'll go with the pause. definitely dont want it timing out cause if im not at the pc, i'll just miss the darned backup like the old ass i am.

now i know task scheduler has a penchant for being able to run scripts without displaying a popup whatsoever. what determines that behavior as in this case I want to avoid it as i'll need that window.

thanks for the help :)
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    Intel i7 9900K
    Motherboard
    Asus Maximus X Formula
    Memory
    64GB G.Skill DDR4
    Graphics Card(s)
    EVGA 2080ti
    Monitor(s) Displays
    U2718Q
    Screen Resolution
    4K
    Hard Drives
    2TB Samsung 970 EVO Plus
    1TB Samsung 970 EVO Plus
    ~200TB worth of spinners in a DAS via LSI HBA
    PSU
    EVGA 1500 supernova
    Case
    Corsair 900D
    Cooling
    Custom Water
    Keyboard
    Razer Blackwidow Chroma v2
    Mouse
    Razer Naga Trinity
    Internet Speed
    Gigabit Fiber
    Browser
    Brave
I don't really use Task Scheduler, but I 'think' there are ways of doing batch scripts with and without it showing the window, so I think when someone is able to advise you on this part it's a matter of a simple switch on the command to display the window.

Sorry I couldn't help more
 

My Computers

System One System Two

  • OS
    Windows 11 Pro β
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion Laptop 15-eg0070wm
    CPU
    Intel® Core™ i7-1165G7
    Memory
    32 GB DDR4-3200 SDRAM
    Graphics Card(s)
    Intel® Iris® Xᵉ Graphics
    Screen Resolution
    1920x1080
    Hard Drives
    2TB PCIe® NVMe™ M.2 SSD
  • Operating System
    macOS Ventura
    Computer type
    PC/Desktop
    Manufacturer/Model
    Apple iMac 27" 5K (2017)
    CPU
    3.4 GHz Quad-Core Intel Core i5
    Memory
    40 GB 2400 MHz DDR4
    Graphics card(s)
    Radeon Pro 570 4 GB
    Monitor(s) Displays
    27" 5K, 34" UW
    Screen Resolution
    Mon 1: 5120 × 2880 Mon 2: 2560 x 1080
    Hard Drives
    32GB NVME, 1TB SSD
I don't really use Task Scheduler, but I 'think' there are ways of doing batch scripts with and without it showing the window, so I think when someone is able to advise you on this part it's a matter of a simple switch on the command to display the window.

Sorry I couldn't help more
no problem at all. i'm sure its easily dig-up-able via google anyhow. I appreciate the time and help!
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    Intel i7 9900K
    Motherboard
    Asus Maximus X Formula
    Memory
    64GB G.Skill DDR4
    Graphics Card(s)
    EVGA 2080ti
    Monitor(s) Displays
    U2718Q
    Screen Resolution
    4K
    Hard Drives
    2TB Samsung 970 EVO Plus
    1TB Samsung 970 EVO Plus
    ~200TB worth of spinners in a DAS via LSI HBA
    PSU
    EVGA 1500 supernova
    Case
    Corsair 900D
    Cooling
    Custom Water
    Keyboard
    Razer Blackwidow Chroma v2
    Mouse
    Razer Naga Trinity
    Internet Speed
    Gigabit Fiber
    Browser
    Brave

My Computer

System One

  • OS
    Windows 11 Pro v 23H2 (Build 22631.3520)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Precision 3660 Tower Workstation
    CPU
    12th Gen Intel(R) Core(TM) i9-12900 5.10 GHz
    Motherboard
    64-bit operating system, x64-based processor
    Memory
    32.00 GB
    Graphics Card(s)
    Intel UHD Graphics 770
    Sound Card
    Realtek Audio
    Monitor(s) Displays
    Dell P2714H Monitor
    Screen Resolution
    1920 x 1080
    Hard Drives
    1 x 512GB NVME PC801 NVMe SK hynix Boot
    1 x 1TB Seagate ST1000LM049-2GH172 Internal HDD
    1 x 1TB Seagate STGX4000400 External HDD
    1 x 2TB Seagate STGX4000400 External HDD
    1 x 4TB Seagate STGX4000400 External HDD
    PSU
    300 Watts
    Cooling
    Air
    Keyboard
    Microsoft Wired Keyboard 600
    Mouse
    Microsoft USB Basic Optical Mouse v2.0
    Browser
    Firefox
    Antivirus
    Windows Defender + Malwarebytes Premium
    Other Info
    BaseBoard Manufacturer Dell Inc.
    BaseBoard Product 0J1CP3
    BaseBoard Version A01

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Back
Top Bottom