0

I run a script from the command line like so:

/home/user/data-transfer/swap/fetch_swap_swavint.sh >>/home/user/data-transfer/logs/swap_swavint.`date "+%Y%m%d%H%M"`.log 2>&1

Everything works as expected. However when launching from the crontab like so:

0 19 * * * /home/user/data-transfer/swap/fetch_swap_swavint.sh >>/home/user/data-transfer/logs/swap_swavint.`date "+%Y%m%d%H%M"`.log 2>&1

I get the following errors:

/bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 1: syntax error: unexpected end of file

If it works from the command line shouldn't it work from crontab. Do I miss some escaping or quotes somewhere?

Thanks for pointers.

user1472672
  • 313
  • 1
  • 9

0 Answers0