s-aska/dropbox-api-command

crontab

fabiodj opened this issue · 2 comments

I use freebsd 11.
I'm trying to put the script in cron:

#!/bin/bash
command='dropbox-api sync dropbox:/teste/ /teste/ -Dv'
NEXT_WAIT_TIME=0
EXIT_CODE=0
until $command || [ $NEXT_WAIT_TIME -eq 4 ]; do
EXIT_CODE=$?
sleep $NEXT_WAIT_TIME
let NEXT_WAIT_TIME=NEXT_WAIT_TIME+1
done
exit $EXIT_CODE

But I get the error:

env: perl: No such file or directory
1
env: perl: No such file or directory
2
env: perl: No such file or directory
3
env: perl: No such file or directory
4
env: perl: No such file or directory

Can someone help me?

The perl command was not found, please go through PATH.

Thanks

Right.
The perl module was being called by: /usr/bin/env perl

But I changed to: / usr/local/ bin/perl
Now it's working

This was only needed in cron.
Running on the terminal works without issue.