ajkis / scripts

Ajki's scripts & guides
https://ajkis.github.io/scripts/
324 stars 91 forks source link

runs command line but not crontab #8

Closed Krandor1 closed 7 years ago

Krandor1 commented 7 years ago

I'm trying to us the rclone-upload.cron script. If I run it manually from the CLI it works fine however running out of crontab is giving the following errors (this is from log file so one error per run and below I show it runs fine manually. On Ubuntu Linux.

Ideas?

Crontab entry is

Log file records

/home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count /home/owner/rclone-upload.cron: 14: read: arg count

Manual run fine

root@Krandor:/home/owner# /home/owner/rclone-upload.cron 19.03.2017 02:27:37 RCLONE UPLOAD STARTED

Krandor1 commented 7 years ago

Got it working. crontab was trying to run it with /bin/sh instead of /bin/bash. So manually told it to use bash and it worked.