1

I have written a bash script to copy a complete directory between two remotes which worked perfectly (i.e. I can see the folder I copied to my desired destination) when I use sbatch command on it. However, when I set this to crontab, it doesn't show my copied folder only sends me a message that the job has been submitted. Here is the rclone command which i saved in file1.txt

rclone --config=mykey.conf copy ./desiredtocopy/ /mydestination/: -P

Then i called this command (file1.txt) using the srun command which i saved in another script called MyCopy.sh as follow:

srun bash /myproject/path/file1.txt

Then i set the crontab to run on daily basis as follow:

* 5 * * * sbatch /myproject/path/file1.txt >> /myproject/path/file1.log 2>&1

Unfortunately i only received the logs that my jobs has been submitted but i dont see the "desiredtocopy" folder in my destination (myproject/path/); However if i run only sbatch /myproject/path/file1.txt i will see "desiredtocopy" folder in my destination.

Please what am i doing wrong.

0 Answers0