为什么crontab无法在我所需的目的地目录中显示我的rclone复制数据
我已经编写了一个bash脚本,以在两个遥控器之间复制一个完整的目录,这些遥控器(即我可以在其上使用sbatch命令复制到所需目的地的文件夹)。但是,当我将其设置为crontab时,它并没有显示我的复制文件夹只会向我发送一条消息,显示该作业已提交。 这是我保存在file1.txt中的rclone命令
rclone --config=mykey.conf copy ./desiredtocopy/ /mydestination/: -P
,然后使用srun命令称此命令(file1.txt)我将其保存在另一个脚本mycopy.sh.sh中的srun命令如下:
srun bash /myproject/path/file1.txt
然后,我将每天运行的crontab设置为运行为如下:
* 5 * * * sbatch /myproject/path/file1.txt >> /myproject/path/file1.log 2>&1
不幸的是,我只收到了我的作业已提交的日志,但我在目的地(myproject/path/)中没有看到“ desiredtocopy”文件夹; 但是,如果我仅运行sbatch/myproject/path/file1.txt
我将在目的地中看到“ DesiredTocopy”文件夹。
请我做错了什么。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论