ive written a couple a couple of scripts. are they going to work indefinatly and will them eventually overload the CPU?
firstly this is on a local nas that for some reason the manufacturer does not give root access or su i have an admin account so i cant just call the script with cron
#!/bin/bash #connect to server download files rsync -ae "ssh -p 10045 -T -o Compression=no -x" --progress email@example.com:/APPBOX_DATA/apps/rutorrent.witzend007.appboxes.co/torrents/completed/toNAS /mnt/md0/User/admin/home/incomingdata/ --delete wait #copy files to temp folder cp -r /mnt/md0/User/admin/home/incomingdata/toNAS /mnt/md0/User/admin/home/incomingdata/temp wait #Start Filebot and organise and rename files to plex library ~/filebot-portable/filebot.sh -script fn:amc --output "/mnt/md0/public/Media" --action move -non-strict "/mnt/md0/User/admin/home/incomingdata/temp" --log-file amc.log --def excludeList=amc.txt wait #remove temp folder/files rm -r /mnt/md0/User/admin/home/incomingdata/temp wait #start sleep script ( "/mnt/md0/User/admin/home/filebot-portable/martinsleep.sh" )
calls the second script (which waits set time and recalls the first script)
#!/bin/bash sleep 60 wait ( "/mnt/md0/User/admin/home/filebot-portable/martinsamc.sh" )
and then i exit vssh using
this method is working the script is continuing to run in the background with vssh closed down
i do plan on changing the sleep time to 30mins my worry is that this is just opening tonnes of scripts and will eventually eat resources
Is there a better way of me achieving this?