Anacron running running my daily task each hour [duplicate]Tell me where is mistake in anacron task?Running CRON job on Ubuntu server for SugarCRMHow to set environment variables for anacron?Disable daily anacron mail updatesHow to set up a root cron job properlyanacron cron.weekly only runs when logged inconfusion about cron and anacron (setting up backup schedule for rsnapshot)Daily Cron Job killing Java ApplicationHow to change cron log level?Anacron daily job not being executed

English equivalent of the Malayalam saying "don't stab/poke the dead body"?

Struggling to understand degenerate perturbation theory

What is the equivalent of "if you say so" in German?

Teleportation is invented but it has nasty side-effects % of the time, how will that affect usage of the technology?

Which Formula One races did Scuderia Ferrari not take part in?

Body swap, then building it back to health

Cheat at Rock-Paper-Scissors-Lizard-Spock

Do dead weight 'components' exist?

On how/if I should ask my supervisor about lead authorship?

Players who play fast in longer time control games

How should I push back against ridiculous work time expectations?

A lightweight version of std::shared_ptr<T>

Help with sauna heater wiring diagram

Wood versus marble rolling pin 'performance'

How likely are you to be injured by falling shot from a game shoot?

Is this bible in Koine Greek?

Someone Called Someone With My Phone Number

Security risks of user generated HTML?

How did composers "test" their music?

Dodging a Deathbeam travelling at speed of light

How often to check credit card statement

Instant coffee melts like chocolate

What is the difference between money and currency?

Fast symmetric key cryptography class



Anacron running running my daily task each hour [duplicate]


Tell me where is mistake in anacron task?Running CRON job on Ubuntu server for SugarCRMHow to set environment variables for anacron?Disable daily anacron mail updatesHow to set up a root cron job properlyanacron cron.weekly only runs when logged inconfusion about cron and anacron (setting up backup schedule for rsnapshot)Daily Cron Job killing Java ApplicationHow to change cron log level?Anacron daily job not being executed






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









0


















This question already has an answer here:



  • Tell me where is mistake in anacron task?

    1 answer



I wanted to schedule a daily task using anacron. After some reading I added the below line to /etc/anacrontab:



@daily 10 price_scrape /home/pawel/Project_Inflation/run.sh >> /home/pawel/Project_Inflation/log/task_log 2>> /home/pawel/Project_Inflation/log/error_log


This works (script executes as expected) but is done hourly whilst it should be done once a day. Here is the output of grep 'cron' /var/log/syslog:



Jun 27 15:02:24 pawel-ubuntu anacron[399]: Anacron 2.3 started on 2019-06-27
Jun 27 15:02:24 pawel-ubuntu anacron[399]: anacron: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 15:02:24 pawel-ubuntu anacron[399]: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 15:02:24 pawel-ubuntu anacron[399]: Will run job `price_scrape' in 10 min.
Jun 27 15:02:24 pawel-ubuntu anacron[399]: Jobs will be executed sequentially
Jun 27 15:12:24 pawel-ubuntu anacron[399]: Job `price_scrape' started
Jun 27 15:12:53 pawel-ubuntu anacron[399]: Job `price_scrape' terminated
Jun 27 15:12:53 pawel-ubuntu anacron[399]: Normal exit (1 job run)
Jun 27 15:17:01 pawel-ubuntu CRON[721]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jun 27 16:02:24 pawel-ubuntu systemd[1]: Started Run anacron jobs.
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Anacron 2.3 started on 2019-06-27
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: anacron: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Will run job `price_scrape' in 10 min.
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Jobs will be executed sequentially
Jun 27 16:12:24 pawel-ubuntu anacron[2762]: Job `price_scrape' started
Jun 27 16:12:53 pawel-ubuntu anacron[2762]: Job `price_scrape' terminated


It seemed to me that anacron is actually ran by cron itself and on system start up, but to my surprise there is an anacron service and associated anacron timer which triggeres every hour. When I stop the service and the timer however the job will not run at all. Any suggestions as to why the daily period is not respected?



Thanks










share|improve this question


















marked as duplicate by Rinzwind, karel, Kulfy, Elder Geek, Fabby Jun 28 at 21:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • @Rinzwind I thought about that, but the actual answer to OP's question is only in a comment there.

    – Organic Marble
    Jun 27 at 15:18






  • 1





    "Also, the manpage notes that, as of now, period_name can only be monthly. So instead of daily, one would have to use:" did it for me . Had to remove the ATs :X

    – Rinzwind
    Jun 27 at 15:24












  • @Rinzwind good catch, I missed that.

    – Organic Marble
    Jun 27 at 15:25

















0


















This question already has an answer here:



  • Tell me where is mistake in anacron task?

    1 answer



I wanted to schedule a daily task using anacron. After some reading I added the below line to /etc/anacrontab:



@daily 10 price_scrape /home/pawel/Project_Inflation/run.sh >> /home/pawel/Project_Inflation/log/task_log 2>> /home/pawel/Project_Inflation/log/error_log


This works (script executes as expected) but is done hourly whilst it should be done once a day. Here is the output of grep 'cron' /var/log/syslog:



Jun 27 15:02:24 pawel-ubuntu anacron[399]: Anacron 2.3 started on 2019-06-27
Jun 27 15:02:24 pawel-ubuntu anacron[399]: anacron: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 15:02:24 pawel-ubuntu anacron[399]: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 15:02:24 pawel-ubuntu anacron[399]: Will run job `price_scrape' in 10 min.
Jun 27 15:02:24 pawel-ubuntu anacron[399]: Jobs will be executed sequentially
Jun 27 15:12:24 pawel-ubuntu anacron[399]: Job `price_scrape' started
Jun 27 15:12:53 pawel-ubuntu anacron[399]: Job `price_scrape' terminated
Jun 27 15:12:53 pawel-ubuntu anacron[399]: Normal exit (1 job run)
Jun 27 15:17:01 pawel-ubuntu CRON[721]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jun 27 16:02:24 pawel-ubuntu systemd[1]: Started Run anacron jobs.
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Anacron 2.3 started on 2019-06-27
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: anacron: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Will run job `price_scrape' in 10 min.
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Jobs will be executed sequentially
Jun 27 16:12:24 pawel-ubuntu anacron[2762]: Job `price_scrape' started
Jun 27 16:12:53 pawel-ubuntu anacron[2762]: Job `price_scrape' terminated


It seemed to me that anacron is actually ran by cron itself and on system start up, but to my surprise there is an anacron service and associated anacron timer which triggeres every hour. When I stop the service and the timer however the job will not run at all. Any suggestions as to why the daily period is not respected?



Thanks










share|improve this question


















marked as duplicate by Rinzwind, karel, Kulfy, Elder Geek, Fabby Jun 28 at 21:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • @Rinzwind I thought about that, but the actual answer to OP's question is only in a comment there.

    – Organic Marble
    Jun 27 at 15:18






  • 1





    "Also, the manpage notes that, as of now, period_name can only be monthly. So instead of daily, one would have to use:" did it for me . Had to remove the ATs :X

    – Rinzwind
    Jun 27 at 15:24












  • @Rinzwind good catch, I missed that.

    – Organic Marble
    Jun 27 at 15:25













0












0








0









This question already has an answer here:



  • Tell me where is mistake in anacron task?

    1 answer



I wanted to schedule a daily task using anacron. After some reading I added the below line to /etc/anacrontab:



@daily 10 price_scrape /home/pawel/Project_Inflation/run.sh >> /home/pawel/Project_Inflation/log/task_log 2>> /home/pawel/Project_Inflation/log/error_log


This works (script executes as expected) but is done hourly whilst it should be done once a day. Here is the output of grep 'cron' /var/log/syslog:



Jun 27 15:02:24 pawel-ubuntu anacron[399]: Anacron 2.3 started on 2019-06-27
Jun 27 15:02:24 pawel-ubuntu anacron[399]: anacron: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 15:02:24 pawel-ubuntu anacron[399]: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 15:02:24 pawel-ubuntu anacron[399]: Will run job `price_scrape' in 10 min.
Jun 27 15:02:24 pawel-ubuntu anacron[399]: Jobs will be executed sequentially
Jun 27 15:12:24 pawel-ubuntu anacron[399]: Job `price_scrape' started
Jun 27 15:12:53 pawel-ubuntu anacron[399]: Job `price_scrape' terminated
Jun 27 15:12:53 pawel-ubuntu anacron[399]: Normal exit (1 job run)
Jun 27 15:17:01 pawel-ubuntu CRON[721]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jun 27 16:02:24 pawel-ubuntu systemd[1]: Started Run anacron jobs.
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Anacron 2.3 started on 2019-06-27
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: anacron: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Will run job `price_scrape' in 10 min.
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Jobs will be executed sequentially
Jun 27 16:12:24 pawel-ubuntu anacron[2762]: Job `price_scrape' started
Jun 27 16:12:53 pawel-ubuntu anacron[2762]: Job `price_scrape' terminated


It seemed to me that anacron is actually ran by cron itself and on system start up, but to my surprise there is an anacron service and associated anacron timer which triggeres every hour. When I stop the service and the timer however the job will not run at all. Any suggestions as to why the daily period is not respected?



Thanks










share|improve this question


















This question already has an answer here:



  • Tell me where is mistake in anacron task?

    1 answer



I wanted to schedule a daily task using anacron. After some reading I added the below line to /etc/anacrontab:



@daily 10 price_scrape /home/pawel/Project_Inflation/run.sh >> /home/pawel/Project_Inflation/log/task_log 2>> /home/pawel/Project_Inflation/log/error_log


This works (script executes as expected) but is done hourly whilst it should be done once a day. Here is the output of grep 'cron' /var/log/syslog:



Jun 27 15:02:24 pawel-ubuntu anacron[399]: Anacron 2.3 started on 2019-06-27
Jun 27 15:02:24 pawel-ubuntu anacron[399]: anacron: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 15:02:24 pawel-ubuntu anacron[399]: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 15:02:24 pawel-ubuntu anacron[399]: Will run job `price_scrape' in 10 min.
Jun 27 15:02:24 pawel-ubuntu anacron[399]: Jobs will be executed sequentially
Jun 27 15:12:24 pawel-ubuntu anacron[399]: Job `price_scrape' started
Jun 27 15:12:53 pawel-ubuntu anacron[399]: Job `price_scrape' terminated
Jun 27 15:12:53 pawel-ubuntu anacron[399]: Normal exit (1 job run)
Jun 27 15:17:01 pawel-ubuntu CRON[721]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jun 27 16:02:24 pawel-ubuntu systemd[1]: Started Run anacron jobs.
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Anacron 2.3 started on 2019-06-27
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: anacron: /etc/anacrontab: Unknown named period on line 14, skipping
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Will run job `price_scrape' in 10 min.
Jun 27 16:02:24 pawel-ubuntu anacron[2762]: Jobs will be executed sequentially
Jun 27 16:12:24 pawel-ubuntu anacron[2762]: Job `price_scrape' started
Jun 27 16:12:53 pawel-ubuntu anacron[2762]: Job `price_scrape' terminated


It seemed to me that anacron is actually ran by cron itself and on system start up, but to my surprise there is an anacron service and associated anacron timer which triggeres every hour. When I stop the service and the timer however the job will not run at all. Any suggestions as to why the daily period is not respected?



Thanks





This question already has an answer here:



  • Tell me where is mistake in anacron task?

    1 answer







cron anacron






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited Jun 27 at 15:22









Organic Marble

12.5k9 gold badges40 silver badges67 bronze badges




12.5k9 gold badges40 silver badges67 bronze badges










asked Jun 27 at 15:06









MintBerryCrunchMintBerryCrunch

31 bronze badge




31 bronze badge





marked as duplicate by Rinzwind, karel, Kulfy, Elder Geek, Fabby Jun 28 at 21:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











marked as duplicate by Rinzwind, karel, Kulfy, Elder Geek, Fabby Jun 28 at 21:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Rinzwind, karel, Kulfy, Elder Geek, Fabby Jun 28 at 21:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • @Rinzwind I thought about that, but the actual answer to OP's question is only in a comment there.

    – Organic Marble
    Jun 27 at 15:18






  • 1





    "Also, the manpage notes that, as of now, period_name can only be monthly. So instead of daily, one would have to use:" did it for me . Had to remove the ATs :X

    – Rinzwind
    Jun 27 at 15:24












  • @Rinzwind good catch, I missed that.

    – Organic Marble
    Jun 27 at 15:25

















  • @Rinzwind I thought about that, but the actual answer to OP's question is only in a comment there.

    – Organic Marble
    Jun 27 at 15:18






  • 1





    "Also, the manpage notes that, as of now, period_name can only be monthly. So instead of daily, one would have to use:" did it for me . Had to remove the ATs :X

    – Rinzwind
    Jun 27 at 15:24












  • @Rinzwind good catch, I missed that.

    – Organic Marble
    Jun 27 at 15:25
















@Rinzwind I thought about that, but the actual answer to OP's question is only in a comment there.

– Organic Marble
Jun 27 at 15:18





@Rinzwind I thought about that, but the actual answer to OP's question is only in a comment there.

– Organic Marble
Jun 27 at 15:18




1




1





"Also, the manpage notes that, as of now, period_name can only be monthly. So instead of daily, one would have to use:" did it for me . Had to remove the ATs :X

– Rinzwind
Jun 27 at 15:24






"Also, the manpage notes that, as of now, period_name can only be monthly. So instead of daily, one would have to use:" did it for me . Had to remove the ATs :X

– Rinzwind
Jun 27 at 15:24














@Rinzwind good catch, I missed that.

– Organic Marble
Jun 27 at 15:25





@Rinzwind good catch, I missed that.

– Organic Marble
Jun 27 at 15:25










2 Answers
2






active

oldest

votes


















1


















The man page for anacrontab states




The period_name can only be set
to monthly at the present time.




so your daily will not work and is causing the error message anacron: /etc/anacrontab: Unknown named period on line 14, skipping



Sourced from comments at Tell me where is mistake in anacron task?






share|improve this answer


























  • Indeed changing it to 1 works, the job was not re-executed after I started the service again. Thanks.

    – MintBerryCrunch
    Jun 27 at 15:24


















1


















A better approach for me is to drop an executable script in /etc/cron.daily/ and you have no more worries.






share|improve this answer

































    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1


















    The man page for anacrontab states




    The period_name can only be set
    to monthly at the present time.




    so your daily will not work and is causing the error message anacron: /etc/anacrontab: Unknown named period on line 14, skipping



    Sourced from comments at Tell me where is mistake in anacron task?






    share|improve this answer


























    • Indeed changing it to 1 works, the job was not re-executed after I started the service again. Thanks.

      – MintBerryCrunch
      Jun 27 at 15:24















    1


















    The man page for anacrontab states




    The period_name can only be set
    to monthly at the present time.




    so your daily will not work and is causing the error message anacron: /etc/anacrontab: Unknown named period on line 14, skipping



    Sourced from comments at Tell me where is mistake in anacron task?






    share|improve this answer


























    • Indeed changing it to 1 works, the job was not re-executed after I started the service again. Thanks.

      – MintBerryCrunch
      Jun 27 at 15:24













    1














    1










    1









    The man page for anacrontab states




    The period_name can only be set
    to monthly at the present time.




    so your daily will not work and is causing the error message anacron: /etc/anacrontab: Unknown named period on line 14, skipping



    Sourced from comments at Tell me where is mistake in anacron task?






    share|improve this answer














    The man page for anacrontab states




    The period_name can only be set
    to monthly at the present time.




    so your daily will not work and is causing the error message anacron: /etc/anacrontab: Unknown named period on line 14, skipping



    Sourced from comments at Tell me where is mistake in anacron task?







    share|improve this answer













    share|improve this answer




    share|improve this answer










    answered Jun 27 at 15:15









    Organic MarbleOrganic Marble

    12.5k9 gold badges40 silver badges67 bronze badges




    12.5k9 gold badges40 silver badges67 bronze badges















    • Indeed changing it to 1 works, the job was not re-executed after I started the service again. Thanks.

      – MintBerryCrunch
      Jun 27 at 15:24

















    • Indeed changing it to 1 works, the job was not re-executed after I started the service again. Thanks.

      – MintBerryCrunch
      Jun 27 at 15:24
















    Indeed changing it to 1 works, the job was not re-executed after I started the service again. Thanks.

    – MintBerryCrunch
    Jun 27 at 15:24





    Indeed changing it to 1 works, the job was not re-executed after I started the service again. Thanks.

    – MintBerryCrunch
    Jun 27 at 15:24













    1


















    A better approach for me is to drop an executable script in /etc/cron.daily/ and you have no more worries.






    share|improve this answer






























      1


















      A better approach for me is to drop an executable script in /etc/cron.daily/ and you have no more worries.






      share|improve this answer




























        1














        1










        1









        A better approach for me is to drop an executable script in /etc/cron.daily/ and you have no more worries.






        share|improve this answer














        A better approach for me is to drop an executable script in /etc/cron.daily/ and you have no more worries.







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Jun 27 at 15:13









        WinEunuuchs2UnixWinEunuuchs2Unix

        60.3k18 gold badges122 silver badges236 bronze badges




        60.3k18 gold badges122 silver badges236 bronze badges
















            Popular posts from this blog

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?