S
S
softshape2016-04-04 07:06:59
Task Schedulers
softshape, 2016-04-04 07:06:59

What's wrong with this cron entry?

Hello everyone,
the task is to execute a python script every first Monday of the month. The solution is this line in crontab, verbatim -

00  09  1-30 *  *  [ $(date +\%a) = Mo ] && python /www/manage.py act_monthly_report

However, it doesn't work. At the same time, the line CRON[10889] appears in the syslog: (www) CMD ([ $(date +%a) = Mo ] && python /www/manage.py act_monthly_report) - that is, the condition is met. And the script is also fine, if you call "python /www/manage.py act_monthly_report" from the shell, it will work without problems. Together they don't want to.
What can a dog be buried in?
PS. Ubuntu 12.04, if anything.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2016-04-04
@softshape

echo $(date +\%a)
Mon

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question