You are here

Toucan newbie seeking script help

10 posts / 0 new
Last post
rayliang
Offline
Last seen: 13 years 5 months ago
Joined: 2011-04-07 00:55
Toucan newbie seeking script help

I never wrote Toucan scripts before.

I have 3 saved sync jobs:
"HDD backup 1"
"HDD backup 2"
"HDD backup 3"

how do I write a script or batch file so that the 3 jobs will run sequentially?

I tried a batch file, but it runs the 3 jobs simultaniously

3D1T0R
3D1T0R's picture
Offline
Last seen: 3 years 3 months ago
Developer
Joined: 2006-12-29 23:48
Batch file?

I don't use Toucan (yet?), but if you post your Batch file, I or someone else might be able to tell you how you can make it do what you want.

~3D1T0R

rayliang
Offline
Last seen: 13 years 5 months ago
Joined: 2011-04-07 00:55
I have a batch file w/ these

I have a batch file w/ these 3 commands

toucan -j "HDD backup 1"
toucan -j "HDD backup 2"
toucan -j "HDD backup 3"

when the batch file is run, 3 toucan command line windows pop up and proceed to do backup... I want to do this sequentially because I'm doing all 3 backup to the same NAS, and running 3 jobs simultaneously is not efficient.

Ray Liang

3D1T0R
3D1T0R's picture
Offline
Last seen: 3 years 3 months ago
Developer
Joined: 2006-12-29 23:48
Try This
start /WAIT toucan -j "HDD backup 1"
start /WAIT toucan -j "HDD backup 2"
start /WAIT toucan -j "HDD backup 3"

If that opens up an extra new Command Prompt window then add /B between each /WAIT and toucan.
Let us know if that works for you.

~3D1T0R

rayliang
Offline
Last seen: 13 years 5 months ago
Joined: 2011-04-07 00:55
nope didn't work apparently

nope didn't work Sad

apparently CMD considered the command finished when it launch Toucan to do backup... not when backup finishs

Ray Liang

3D1T0R
3D1T0R's picture
Offline
Last seen: 3 years 3 months ago
Developer
Joined: 2006-12-29 23:48
I downloaded and messed with Toucan a little bit today,

Where does this Batch file reside?
     I find that if the Batch file (using the one I posted posted for you to try) starts the toucan.exe file in X:\PortableApps\Toucan that it doesn't wait for Toucan to finish (because that .exe file is just a launcher, which closes immediately after executing $EXEDIR\App\Toucan\toucan.exe), but if I make it use the toucan.exe file in X:\PortableApps\Toucan\App\Toucan, then it waits for each backup to finish before starting the next.

Note: Since Toucan is designed by PortableApps.com Developers specifically to be safe to run Portably, running the toucan.exe file in X:\PortableApps\Toucan\App\Toucan is still safely portable, but in general PortableApps should only be run from the launcher located in X:\PortableApps\AppNamePortable

~3D1T0R

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 1 month ago
Developer
Joined: 2005-12-10 15:22
The

really easy way to do this is to write a script with the following three lines

sync("HDD backup 1")
sync("HDD backup 2")
sync("HDD backup 3")

And then run this on the command line:

toucan --script="dofile(getscript([[myscriptname]]))" This will then run them one after the other as you require.

murraykf
Offline
Last seen: 12 years 2 weeks ago
Joined: 2012-05-23 07:39
newbie

Hi Steve,
I am a complete newbie with toucan. This is very obvious to you, but where do I type the command line?? I have created the script above (under the "Script" tab, changing "hdd backup xx" to my own Sync job names), but not sure how to run the command line. Is it a separate script under the script tab?
Thanks.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 1 month ago
Developer
Joined: 2005-12-10 15:22
Hi

I had a quick look around and this looks to be a decent command line tutorial. If you navigate to the folder with toucan in it using the commands then you can use the command I gave above.

If you are just looking to create an easy way to run that particular script then you can create a batch file. Open up notepad and then copy and paste the line in. Then save it as a .bat file and when you double click on it the script will run.

murraykf
Offline
Last seen: 12 years 2 weeks ago
Joined: 2012-05-23 07:39
scripts

Hi Steve, Many thanks. It is now working brilliantly, once I sorted it out. It really is a great program.

Log in or register to post comments