How kill "bash" process after cronjob (script sh) [Help]

Hi friends, can you help me please

I don’t have any experience with bash, but a made a script (RcloneUpload.sh), first download some favs videos, then upload this videos to google drive. But always the process “bash” (after end cronjob) is running and use some CPU.

I need after and download > upload kill this process “bash”

#!/bin/bash
NOW=$(date ‘+%Y%m%d’);
AF=$(date -d ‘7 days ago’ ‘+%Y%m%d’);
youtube-dl -f 22/18
-i --dateafter ${AF} --datebefore ${NOW}
–playlist-end 5
-o “/home/Channel/%(title)s.%(ext)s”
https://www.youtube.com/user/Channel;
rclone copy /home/Channel gdrive:myvideos “–transfers” “2” --stats 5s;
rm /home/fail/*mp4;
exit

I will be very grateful with your help!

The script should end itself and killing it really isn’t a good way to stop it as it should exit on its own.

If you run it by hand, does it exit?

When you run things via cron, there is no path or anything else so you do need to use full path names are add in a line to add in paths you need.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.