Page 1 of 1

Schedule a cron task to run just once

Posted: Thu Feb 04, 2016 8:59 am
by neiklot
Hi guys!

Yesterday I scheduled a cron task to run at midnight and it didn't work.

Those are my settings:

Image

I wanted to run it at 2016-02-04 00:01 and nothing happened.

What am I doing wrong? Thanks a lot guys!

Re: Schedule a cron task to run just once

Posted: Thu Feb 04, 2016 9:38 am
by skurudo
sudo maybe? user admin without sudo not powerfull enough.

Check your command from console, if it works fine.

Re: Schedule a cron task to run just once

Posted: Thu Feb 04, 2016 10:43 am
by Elizine
Try this one -

Code: Select all

0 0 04 2 ? 2016  /command
or

Code: Select all

15 14 15 05 * /tmp/run-my-job

Re: Schedule a cron task to run just once

Posted: Thu Feb 04, 2016 12:48 pm
by neiklot
skurudo wrote:sudo maybe? user admin without sudo not powerfull enough.

Check your command from console, if it works fine.
No, it not a sudo problem I think. I will test it anyway.
Elizine wrote:Try this one -

Code: Select all

0 0 04 2 ? 2016  /command
or

Code: Select all

15 14 15 05 * /tmp/run-my-job
I'm sorry but I don't understand your answer. Do I need to run it from terminal?

Thanks both for your answers!

Re: Schedule a cron task to run just once

Posted: Thu Feb 04, 2016 3:04 pm
by skurudo
neiklot wrote:I'm sorry but I don't understand your answer. Do I need to run it from terminal?
If you're use wrong command, you'll never get expected result ;-)

Re: Schedule a cron task to run just once

Posted: Thu Feb 04, 2016 4:38 pm
by neiklot
skurudo wrote:
neiklot wrote:I'm sorry but I don't understand your answer. Do I need to run it from terminal?
If you're use wrong command, you'll never get expected result ;-)
That "I'm sorry..." answer wasn't for you. That answer was for Elizine.