How will you schedule a job that will run every month last day?(some months have 30 days,some 31 days,28,29 days)

Answer Posted / kirtiranjan sahoo

55 23 28-31 * * [[ "$(date --date=tomorrow +\%d)" == "01" ]] && myjob.sh

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the syntax of while loop in shell scripting?

569


How to get the 3rd element/column from each line from a file?

694


How to set an array in linux?

597


What is the use of echo in shell script?

543


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

1791






How does ls command work?

586


how will you find the total disk space used by a specific user?

580


How to print the first array element?

551


Is it possible to substitute "ls" command in the place of "echo" command?

619


How to print pid of the current shell?

604


what is info area how many types?

2290


What is the lifespan of a variable inside a shell script?

1124


What is sh in shell script?

575


What is shell chemistry?

538


What is $1 in shell scripting?

592