Joe
Joe

Reputation: 4514

Crontab enviromental variables

Struggling a bit on this...

I'm using crontab for a lot of todo list management:

Here's a snippet of my crontab...

$TASK=/home/pgrads/joseph/emailAnalysis/single
0,30 * * * * ~/emailAnalysis/python/script.py
15,45 * * * * $TASK/task.sh "foo"
10,40 * * * * /home/pgrads/joseph/emailAnalysis/single/task.sh "bar"

My problem is that the 'foo' task is not triggering - I get the error "/bin/sh: /task.sh: No such file or directory".

A few googles haven't got me very far - mainly they just give me variations on the man page... :s any ideas?

Upvotes: 0

Views: 134

Answers (1)

Mat
Mat

Reputation: 206909

Remove the $ from your first line:

TASK=/home/pgrads/joseph/emailAnalysis/single

Upvotes: 2

Related Questions