Strange crontab problem

  • I have cron enabled in settings.

    I have verified the cron is working by creating a crontab entry

    * * * * * * date >/tmp/date.txt

    And indeed /tmp/date.txt gets the time and date written once per minute.

    However when I change the crontab to

    * * * * * * /storage/usr1/kenc/temps.sh >/tmp/temps.sh.txt 2>&1

    where temps.sh contains

    date

    The file is chmod 755 and runs when executed from an interactive shell.

    I've tried with and without a shebang in the file.

    The script doesn't run.

    Confusingly, /tmp/temps.sh.txt contains:

    /bin/sh: backup: not found

    Any ideas?

    Edited once, last by poodad (October 3, 2022 at 6:32 PM).

  • does it work like this

    * * * * * * echo $(date) >/tmp/temps.sh.txt

    edit : yes you tryed already

    second tought..

    in /storage/usr1/kenc/temps.sh

    change date to

    Code
     echo $(date)