Schedule the last day of every month
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I read from an instruction to schedule a script on the last day of months
The astute reader might be wondering just how you would be able to set a command to execute on the last day of every month because you canâÂÂt set the dayofmonth value to cover every month. This problem has plagued Linux and Unix programmers, and has spawned quite a few different solutions. A common method is to add an if-then statement that uses the date command to check if tomorrowâÂÂs date is 01:
00 12 * * * if [date +%d -d tomorrow = 01 ] ; then ; command1
How does [date +%d -d tomorrow = 01 ]
work,
Is it correct to state then; command1
shell-script
New contributor
add a comment |Â
up vote
0
down vote
favorite
I read from an instruction to schedule a script on the last day of months
The astute reader might be wondering just how you would be able to set a command to execute on the last day of every month because you canâÂÂt set the dayofmonth value to cover every month. This problem has plagued Linux and Unix programmers, and has spawned quite a few different solutions. A common method is to add an if-then statement that uses the date command to check if tomorrowâÂÂs date is 01:
00 12 * * * if [date +%d -d tomorrow = 01 ] ; then ; command1
How does [date +%d -d tomorrow = 01 ]
work,
Is it correct to state then; command1
shell-script
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I read from an instruction to schedule a script on the last day of months
The astute reader might be wondering just how you would be able to set a command to execute on the last day of every month because you canâÂÂt set the dayofmonth value to cover every month. This problem has plagued Linux and Unix programmers, and has spawned quite a few different solutions. A common method is to add an if-then statement that uses the date command to check if tomorrowâÂÂs date is 01:
00 12 * * * if [date +%d -d tomorrow = 01 ] ; then ; command1
How does [date +%d -d tomorrow = 01 ]
work,
Is it correct to state then; command1
shell-script
New contributor
I read from an instruction to schedule a script on the last day of months
The astute reader might be wondering just how you would be able to set a command to execute on the last day of every month because you canâÂÂt set the dayofmonth value to cover every month. This problem has plagued Linux and Unix programmers, and has spawned quite a few different solutions. A common method is to add an if-then statement that uses the date command to check if tomorrowâÂÂs date is 01:
00 12 * * * if [date +%d -d tomorrow = 01 ] ; then ; command1
How does [date +%d -d tomorrow = 01 ]
work,
Is it correct to state then; command1
shell-script
shell-script
New contributor
New contributor
New contributor
asked 6 mins ago
Sawajiri
11
11
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478335%2fschedule-the-last-day-of-every-month%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password