CRON Job Schedule issuescron job scheduleSchedule job at irregular intervalsHow do I format these two complex...

Polar contour plot in Mathematica?

When does The Truman Show take place?

Did Michelle Obama have a staff of 23 people, while Melania has a staff of 4?

what article (a/an) to use when there when there's a parenthesis following it?

Replacing old plug-in 220V range with new hardwire 3-wire electric cooktop: remove outlet or add a plug?

Can the front glass be repaired of a broken lens?

Why did St. Jerome use "virago" in Gen. 2:23?

Check disk usage of files returned with spaces

Is there a utility / method to organize trad gear so that each piece is immediately accessible?

Why is the name Bergson pronounced like Berksonne?

How to render "have ideas above his station" into German

Why is the battery jumpered to a resistor in this schematic?

The Lucky House

What happened after the end of the Truman Show?

Eric Andre had a dream

Are there reliable, formulaic ways to form chords on the guitar?

Output with the same length always

Airline power sockets shut down when I plug my computer in. How can I avoid that?

Trigonometric equations: cotangent

Levenshtein Neighbours

Including a real event in a story

A reccomended structured approach to self studying music theory for songwriting

Outer Class can have how many inner class(es)

Why should P.I be willing to write strong LOR even if that means losing a undergraduate from his/her lab?



CRON Job Schedule issues


cron job scheduleSchedule job at irregular intervalsHow do I format these two complex cron statements?How to setup an invisible cron job?Cron stopped logging to /var/log/cron.logCron jobs run 1 hour off, in total disagreement with system timesCron job with a dynamic datefind not working correctly in cron






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I want to schedule a job for 3rd Friday of every month, 1 AM .
I checked few cron entry websites for that didn't work for me.



I was also checking for some awk options for this so far not successful with that.
Can you guys help me with that?



I tried to run this for today the cron is working fine but the script is running continuously at the same point and not getting completed :



0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt 









share|improve this question

































    0















    I want to schedule a job for 3rd Friday of every month, 1 AM .
    I checked few cron entry websites for that didn't work for me.



    I was also checking for some awk options for this so far not successful with that.
    Can you guys help me with that?



    I tried to run this for today the cron is working fine but the script is running continuously at the same point and not getting completed :



    0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt 









    share|improve this question





























      0












      0








      0








      I want to schedule a job for 3rd Friday of every month, 1 AM .
      I checked few cron entry websites for that didn't work for me.



      I was also checking for some awk options for this so far not successful with that.
      Can you guys help me with that?



      I tried to run this for today the cron is working fine but the script is running continuously at the same point and not getting completed :



      0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt 









      share|improve this question
















      I want to schedule a job for 3rd Friday of every month, 1 AM .
      I checked few cron entry websites for that didn't work for me.



      I was also checking for some awk options for this so far not successful with that.
      Can you guys help me with that?



      I tried to run this for today the cron is working fine but the script is running continuously at the same point and not getting completed :



      0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt 






      cron scheduling






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 days ago







      user3901666

















      asked 2 days ago









      user3901666user3901666

      135 bronze badges




      135 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          1














          Unfortunately, when you give both a day-of-month and a day-of-week in a crontab entry, this means either one is sufficient. (Didn't know that either, but the manpage says so.) This means we can't simply calculate that the 3rd friday is a friday that is between the 15th and 21st of the month.



          Fortunately, the above-linked man page also advises us:




          One can, however, achieve the desired result by adding a test to the command (see the last example in EXAMPLE CRON FILE below).



          […]



          # Run on every second Saturday of the month
          0 4 8-14 * * test $(date +%u) -eq 6 && echo "2nd Saturday"



          so you should be fine with



          0 1 15-21 * *    test $(date +%u) -eq 5 && echo "3rd friday"





          share|improve this answer


























          • So this is how i put the entry as i am passing an argument to ithe script i have to schedule? 0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt

            – user3901666
            2 days ago











          • Can you please tell me if there is any error in the cron entry?

            – user3901666
            2 days ago











          • @user3901666: well, you should leave off the && echo "3rd friday", other than that, that looks good.

            – Ulrich Schwarz
            2 days ago











          • But, I was able to get the cron run with your command , I just had to add a sh before the script. Thank you so much.

            – user3901666
            2 days ago











          • Is this && echo "3rd friday" not required??

            – user3901666
            2 days ago














          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535835%2fcron-job-schedule-issues%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Unfortunately, when you give both a day-of-month and a day-of-week in a crontab entry, this means either one is sufficient. (Didn't know that either, but the manpage says so.) This means we can't simply calculate that the 3rd friday is a friday that is between the 15th and 21st of the month.



          Fortunately, the above-linked man page also advises us:




          One can, however, achieve the desired result by adding a test to the command (see the last example in EXAMPLE CRON FILE below).



          […]



          # Run on every second Saturday of the month
          0 4 8-14 * * test $(date +%u) -eq 6 && echo "2nd Saturday"



          so you should be fine with



          0 1 15-21 * *    test $(date +%u) -eq 5 && echo "3rd friday"





          share|improve this answer


























          • So this is how i put the entry as i am passing an argument to ithe script i have to schedule? 0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt

            – user3901666
            2 days ago











          • Can you please tell me if there is any error in the cron entry?

            – user3901666
            2 days ago











          • @user3901666: well, you should leave off the && echo "3rd friday", other than that, that looks good.

            – Ulrich Schwarz
            2 days ago











          • But, I was able to get the cron run with your command , I just had to add a sh before the script. Thank you so much.

            – user3901666
            2 days ago











          • Is this && echo "3rd friday" not required??

            – user3901666
            2 days ago
















          1














          Unfortunately, when you give both a day-of-month and a day-of-week in a crontab entry, this means either one is sufficient. (Didn't know that either, but the manpage says so.) This means we can't simply calculate that the 3rd friday is a friday that is between the 15th and 21st of the month.



          Fortunately, the above-linked man page also advises us:




          One can, however, achieve the desired result by adding a test to the command (see the last example in EXAMPLE CRON FILE below).



          […]



          # Run on every second Saturday of the month
          0 4 8-14 * * test $(date +%u) -eq 6 && echo "2nd Saturday"



          so you should be fine with



          0 1 15-21 * *    test $(date +%u) -eq 5 && echo "3rd friday"





          share|improve this answer


























          • So this is how i put the entry as i am passing an argument to ithe script i have to schedule? 0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt

            – user3901666
            2 days ago











          • Can you please tell me if there is any error in the cron entry?

            – user3901666
            2 days ago











          • @user3901666: well, you should leave off the && echo "3rd friday", other than that, that looks good.

            – Ulrich Schwarz
            2 days ago











          • But, I was able to get the cron run with your command , I just had to add a sh before the script. Thank you so much.

            – user3901666
            2 days ago











          • Is this && echo "3rd friday" not required??

            – user3901666
            2 days ago














          1












          1








          1







          Unfortunately, when you give both a day-of-month and a day-of-week in a crontab entry, this means either one is sufficient. (Didn't know that either, but the manpage says so.) This means we can't simply calculate that the 3rd friday is a friday that is between the 15th and 21st of the month.



          Fortunately, the above-linked man page also advises us:




          One can, however, achieve the desired result by adding a test to the command (see the last example in EXAMPLE CRON FILE below).



          […]



          # Run on every second Saturday of the month
          0 4 8-14 * * test $(date +%u) -eq 6 && echo "2nd Saturday"



          so you should be fine with



          0 1 15-21 * *    test $(date +%u) -eq 5 && echo "3rd friday"





          share|improve this answer













          Unfortunately, when you give both a day-of-month and a day-of-week in a crontab entry, this means either one is sufficient. (Didn't know that either, but the manpage says so.) This means we can't simply calculate that the 3rd friday is a friday that is between the 15th and 21st of the month.



          Fortunately, the above-linked man page also advises us:




          One can, however, achieve the desired result by adding a test to the command (see the last example in EXAMPLE CRON FILE below).



          […]



          # Run on every second Saturday of the month
          0 4 8-14 * * test $(date +%u) -eq 6 && echo "2nd Saturday"



          so you should be fine with



          0 1 15-21 * *    test $(date +%u) -eq 5 && echo "3rd friday"






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          Ulrich SchwarzUlrich Schwarz

          10.7k1 gold badge32 silver badges50 bronze badges




          10.7k1 gold badge32 silver badges50 bronze badges
















          • So this is how i put the entry as i am passing an argument to ithe script i have to schedule? 0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt

            – user3901666
            2 days ago











          • Can you please tell me if there is any error in the cron entry?

            – user3901666
            2 days ago











          • @user3901666: well, you should leave off the && echo "3rd friday", other than that, that looks good.

            – Ulrich Schwarz
            2 days ago











          • But, I was able to get the cron run with your command , I just had to add a sh before the script. Thank you so much.

            – user3901666
            2 days ago











          • Is this && echo "3rd friday" not required??

            – user3901666
            2 days ago



















          • So this is how i put the entry as i am passing an argument to ithe script i have to schedule? 0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt

            – user3901666
            2 days ago











          • Can you please tell me if there is any error in the cron entry?

            – user3901666
            2 days ago











          • @user3901666: well, you should leave off the && echo "3rd friday", other than that, that looks good.

            – Ulrich Schwarz
            2 days ago











          • But, I was able to get the cron run with your command , I just had to add a sh before the script. Thank you so much.

            – user3901666
            2 days ago











          • Is this && echo "3rd friday" not required??

            – user3901666
            2 days ago

















          So this is how i put the entry as i am passing an argument to ithe script i have to schedule? 0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt

          – user3901666
          2 days ago





          So this is how i put the entry as i am passing an argument to ithe script i have to schedule? 0 1 15-21 * * test $(date +%u) -eq 5 && echo "3rd friday" && Extract_Param.sh /landing/file/ABC/file.txt

          – user3901666
          2 days ago













          Can you please tell me if there is any error in the cron entry?

          – user3901666
          2 days ago





          Can you please tell me if there is any error in the cron entry?

          – user3901666
          2 days ago













          @user3901666: well, you should leave off the && echo "3rd friday", other than that, that looks good.

          – Ulrich Schwarz
          2 days ago





          @user3901666: well, you should leave off the && echo "3rd friday", other than that, that looks good.

          – Ulrich Schwarz
          2 days ago













          But, I was able to get the cron run with your command , I just had to add a sh before the script. Thank you so much.

          – user3901666
          2 days ago





          But, I was able to get the cron run with your command , I just had to add a sh before the script. Thank you so much.

          – user3901666
          2 days ago













          Is this && echo "3rd friday" not required??

          – user3901666
          2 days ago





          Is this && echo "3rd friday" not required??

          – user3901666
          2 days ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535835%2fcron-job-schedule-issues%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

          The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

          Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...