S
S
Sergey2016-01-04 09:38:05
linux
Sergey, 2016-01-04 09:38:05

Is it possible to set the year in the crown?

I have a cron command like this:

00 1 04 01 *wget...

The last asterisk, it turns out, is not a year at all.
It turns out that this command will be executed once a year.
Is it possible, just knowing the date and time, to set a command in cron that will be executed once?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Saboteur, 2016-01-04
@butteff

No, you can specify a maximum month in cron.
But you can add a check for the year
00 1 04 01 * [ `date "+%Y"` == "2016" ] && wget...

D
Dmitry S, 2016-01-04
@Hakkunamatata

Is it possible, just knowing the date and time, to set a command in cron that will be executed once?

Are you seriously? Take and execute the command once with your hands.
In general, here: www.nncron.ru/help/RU/working/cron-format.htm

A
Alexey Shumkin, 2016-01-04
@ashumkin

man at

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question