An issue with scripting/scheduler for container mount backup

Hi,
I have an issue using the scheduler for this script. Is this something that MT should fix? Or perhaps this is an access/permission issue?

This script works when running it manually or via the terminal. However, the scheduler can’t run the script.
2023-02-08_17-34-07.jpg
CLI

/system scheduler
add interval=8h name=container-nginx-backup on-event="/system script run container-nginx-backup" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup
add dont-require-permissions=no name=container-nginx-backup owner=user policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":log info \"Nginx-Backup started\"\r\
    \n\r\
    \n:log info \"DATABASE\"\r\
    \n\r\
    \n/tool fetch address=\"ip\" src-path=\"/pcie1-part1/containers/mounts/nginx-proxy/data/database.sqlite\" user=\"user\" mode=\"ftp\" password=\"pw\" dst-path=\"mounts/nginx-proxy/data/database.sqlite\" upload\
    =yes;\r\
    \n\r\
    \n\r\
    \n:log info \"Nginx-Backup finished\""

You stop the use of the file before backup it?

Hi,
No, it’s a running container. Additionally, It did work when I ran the script manually without the need to stop the container.

update
I stopped the container first and tested the scheduler. It shows the same behavior as before.


workaround
Add another script to run the first script and then the scheduler to run the second script.