woodshop2300
Dabbler
- Joined
- Apr 21, 2016
- Messages
- 46
Hi all.
I'm looking for a way to configure a biweekly job (every other week).
I currently do this on a linux box using this cron line.
When i try to replicate this on FreeNAS the "test" run of the job works ok.
But when cron tries over night i only got an error message.
So i tried dropping one of the parentheses making it.
Still got an error mail.
The subject was
the body was
I'm not sure what the issue is.
It could be it needs translating from Linux to FreeBSD, or Bash to Sh, or both.
Could also be something to do with entering it with the web form?
Maybe its a protection i'm tripping somehow?
I'm looking for a way to configure a biweekly job (every other week).
I currently do this on a linux box using this cron line.
Code:
0 0 * * sat root expr $(( $( date +\%s ) / 86400 )) \% 2 >/dev/null || echo "" | mail -s "Some Subject" your_email@blah.org
When i try to replicate this on FreeNAS the "test" run of the job works ok.
But when cron tries over night i only got an error message.
So i tried dropping one of the parentheses making it.
Code:
0 0 * * sat root expr $( $( date +\%s ) / 86400 ) \% 2 >/dev/null || echo "" | mail -s "Some Subject" your_email@blah.org
Still got an error mail.
The subject was
Code:
Cron <games@Nas> PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" expr $( $( date +\
the body was
Code:
Syntax error: end of file unexpected (expecting ")") Syntax error: Error in command substitution Syntax error: Error in command substitution
I'm not sure what the issue is.
It could be it needs translating from Linux to FreeBSD, or Bash to Sh, or both.
Could also be something to do with entering it with the web form?
Maybe its a protection i'm tripping somehow?