execute a linux script - VisualCron - Forum

Community forum

Thomas Baetens
Hi All,

I have an SSH connection in VC to a Ubuntu management server. On that management server I wrote a script that can backup all our firewalls (not possible in VC due to authentication problems).
Now I can automate my script in cron on that ubuntu server, but I would like to have a central management of scheduled jobs, so I would like to execute it in VC.

For the moment I have a task that connects to my SSH connections and then executes the following 3 commands:
1. sleep 5
2. ./foldername1/foldername2/script.sh
3. sleep 30

Now after the 35 seconds the task is finished with the following output
bash: ./folder1/folder2/script.sh: No such file or directory
If I execute this on a seperate SSH connection then the command works fine?

Any idea what I'm doing wrong?
Have you tried both Text and Command option?
Please like  VisualCron on facebook!
The only thing I can think of that would cause that is you using relative paths by starting with ./foldername1

Are you sure you're logged in and are in the root folder? or when your credentials establish the SSH connection are you being directed to a home folder of some sort?

What I would do is run your command and just issue a PWD command and see what that output returns as.

In our SSH executions of shell scripts, we typically log in, and regardless of what folder we get logged into, we issue the full path to the script:

sudo /srv/folder/folder2/script.sh

Without dot sourcing it.

Scroll to Top