Friday, June 21, 2013

@reboot jobs will be run at computer's startup.

"@reboot jobs will be run at computer's startup."
What on earth does that mean?

These days RedHat use cronie as the system cron daemon. Described as 'based on the original cron' I think it is a fork of vixi-cron which was used until EL5.

For some time, both of these cron daemons have had an @reboot syntax which allows you to run scripts at (more or less) boot time (when the cron daemon is started). This allows users to start long running processes without the sysadmin having to write an initscript.

It also happens that from time to time, the cron daemon crashes. This is not ideal because cron is the very tool which can be used to periodically confirm that a daemon has not crashed. For now I have added a check to puppet to ensure that the cron daemon is running.

When the cron daemon is started, it logs some messages, one of which is the cryptic:
@reboot jobs will be run at computer's startup.
message. I understand that it is trying to tell me something but it fals short of conveying the message. The internet did not have much to say on the topic either so I had to resort to the source code.

The source of the message is from within the run_reboot_jobs function. The function first checks the existence of a (so called) lock file. The file is
/var/run/cron.reboot
If this file is present, the message is printed out and none of the @reboot jobs are run. If the file is absent, it is created and then the @reboot jobs are queued up to be run.

Perhaps the message should read:
Lock file /var/run/cron.reboot present. @reboot jobs have already been run. skipping.

So that is the mystery almost solved. The remaining details are that during boot, the rc.sysinit script removed a number of stale lock files, including the contents of /var/run. This ensures that at boot time, the cron daemon runs the @reboot jobs.

If you wanted to re-run the @reboot jobs without rebooting your server, you can easily trick it with:
rm /var/run/cron.reboot
service crond restart

Perhaps that could also be added to the init script so you run
service crond restart-boot




28 comments:

  1. I am genuinely thankful to the holder of this web page who has shared this fantastic paragraph at here. The innovative communication skills are absolutely necessary in the cutting edge environment these days; the will enhance the level of competency. Go through with this site: Write my Essay

    ReplyDelete
  2. Great post I would like to thank you for the efforts you have made in writing this interesting and knowledgeable article. Worldtalentjobs

    ReplyDelete
  3. This is not an error. It only indicates that your server has probably been restarted and your Cron daemon is running the jobs scheduled with a

    homepage

    ReplyDelete
  4. Thank you for your share the best post with me!
    the impossible game

    ReplyDelete
  5. Often described as the "best actress of her generation", Meryl Streep net worth is particularly known for her versatility and accents. Her accolades include a record 21 Academy Award nominations, winning three, and a record 32 Golden Globe Award nominations, winning nine. Streep made her stage debut in Trelawny of the Wells and received a Tony Award nomination for 27 Wagons Full of Cotton and A Memory of Two Mondays in 1976. In 1977, she made her film debut in Julia. In 1978, she won a Primetime Emmy Award for her leading role in the miniseries Holocaust, and received her first Oscar nomination for The Deer Hunter. Streep won the Academy Award for Best Supporting Actress for playing a troubled wife in Kramer vs. Kramer (1979) and went on to establish herself as a film actress in the 1980s. She won the Academy Award for Best Actress for starring as a Holocaust survivor in Sophie's Choice (1982) and had her biggest commercial success to that point in Out of Africa (1985). She continued to gain critical and awards recognition for her work in the late 1980s and 1990s, but commercial success was varied, with the comedy Death Becomes Her (1992) and the drama The Bridges of Madison County (1995), becoming her biggest earners in that period.
    Meryl Streep reclaimed her stardom in the 2000s and 2010s with starring roles in Adaptation (2002), The Hours (2002), The Devil Wears Prada (2006), Doubt (2008), Mamma Mia! (2008), Julie & Julia (2009), It's Complicated (2009), Into the Woods (2014), The Post (2017) and Little Women (2019). She also won her third Academy Award for her portrayal of British Prime Minister Margaret Thatcher in The Iron Lady (2011). Her stage roles include The Public Theater's 2001 revival of The Seagull, and her television roles include two projects for HBO, the miniseries Angels in America (2003), for which she won another Emmy Award, and the drama series Big Little Lies (2019).
    Meryl Streep is one of the most widely known and acclaimed actors in history. Ms. Streep has captured our imaginations with her unparalleled ability to portray a wide range of roles and attract an audience that has only grown over time, portraying characters who embody the full range of the human experience.

    ReplyDelete
  6. Hi. I recently found who can write an article review for me. This is very cool. I found a service where I can get extra help. I'm happy to share this information with you.

    ReplyDelete
  7. Assignment help is brilliant for every student because it takes away the extra baggage students face in their academic life. A great assignment writing website will teach you how to write great quality, 100 % plagiarism-free, customized, and well-researched assignments. And, it helps you to score an A+ grade. - My Assignment Experts

    ReplyDelete
  8. There is no way to get this useful info your way. Its very fabulous and easy for me to get it from GBWhatsApp. I am very thankful and I appreciate your intelligent work. Awesome!!

    ReplyDelete
  9. Excellent post and very informative as well. Your knowledge appears very well on this topic and the way you have explained it, any new person can understand it easily. I would like you to keep writing like this and share your information with us is plasu post utme form out

    ReplyDelete
  10. Very informative post! This post gives truly quality information. I am already done it and find that this post is really amazing. Thank you for this brief explanation and very nice information. Kindly Visit our Website:- AOL Mail Is Working Slow Problems

    ReplyDelete
  11. تنسيق الحدائق المنزلية من الامور الممتعة وهي غالبا تتطلب فقط تنظيم وترتيب الفضاء بحيث تستغل كل فراغ في الحديقة وتمزج بين الالوان للحصول على منظر جميل من النباتات
    تنسيق حدائق

    الحشرات الضارة هي الحشرات التي تلحق الضرر بالإنسان وممتلكاتهم ومحاصيلهم ومواشيهم ، وهي منتشرة في جميع أنحاء العالم ، وقد تسبب الحشرات أضرارًا مباشرة ، أي بامتصاص دماء الكائنات الحية ، أو أكل أنسجتها ، أو بشكل غير مباشر ، عن طريق إزالتها. تنتقل مسببات الأمراض أو الطفيليات إلى الكائنات الحية ، وغالبًا ما يكون الضرر هو البالغين. وأحيانًا يكون الضرر في البالغين ويرقاتهم. قد تعمل هذه الحشرات بمفردها أو قد تهاجم في مجموعات. في أي حال ، يجب مكافحة الآفات والقضاء عليها لتجنب التسبب في ضرر
    شركة مكافحة حشرات بالطائف
    نظافة وجمال منزلك خير دليل على نظافة الجدران حيث ينكشف بسرعة أكبر قدر من الأوساخ والغبار والأوساخ ، كما نقوم بتنظيف الجدران بالطلاء والمواد الحافظة للجدران وتنظيفها بكفاءة عالية. تستخدمين أفضل وأقوى وأسلم المنظفات لصحتك ، والتي تحتوي أيضًا على عطر ذكي يعزز جمال المكان. يبدأ التنظيف بغسل جميع أنواع الجدران سواء كانت دهانات أو دريوال أو جميع أنواع ورق الحائط.
    شركة تنظيف فلل بالطائف

    ReplyDelete
  12. 192.168.1.1 is a private IP address used to login the admin panel of a router. 192.168.l.l is pre-specified by the router companies as the default gateway address and can be used to make different changes to the router’s settings.
    192.168.0.1

    ReplyDelete
  13. Spot on with this write-up, I truly think this website needs much more consideration. I’ll probably be again to read much more, thanks for that info.

    Habotao.com
    Information
    Click Here
    Visit Web

    ReplyDelete
  14. Oh nice! This service is really cool but let me tell you new one! This personal statement writer service and dont worry becouse they really know how to do it! Good luck and have un my dear! Enjoy!

    ReplyDelete
  15. Hey Nice Article. I am Oliver Brown; I am an academic helper. For that I am always reading this type of article for enhance my skill and knowledge, so that I can help students more significantly. If any student want law assignment help can contact me.

    ReplyDelete
  16. This is a very good tip particularly to those fresh to the blogosphere. Brief but very accurate information… Appreciate your sharing this one. A must read post. 스포츠토토

    ReplyDelete
  17. Wow! This can be one particular of the most beneficial blogs We have ever arrive across on this subject. 파칭코사이트인포

    ReplyDelete
  18. Well I truly enjoyed reading it. This subject offered by you is very helpful and accurate. 바카라사이트

    ReplyDelete
  19. Nice response in return of this question with real arguments and explaining the whole thing about that. 바카라사이트

    ReplyDelete
  20. It's hard not to read this post, interesting! Sharing is caring! 바둑이사이트

    ReplyDelete
  21. Note that the filename you have to delete is /run/crond.reboot (i.e. you are missing the "d" and on newer system /var/run is a soft link to /run)

    ReplyDelete
  22. Osm! This post is very informative and effective. I got what I was looking for. Here to say thank you. Thanks for sharing Zoom MOD APK valuable content.

    ReplyDelete
  23. UK49s Lunchtime Results and UK Teatime Results Updated daily on time.Lunchtime Result Today10insta DownloaderSouth Africa's best website for Uk49s Results, Predictions, Past History.

    ReplyDelete
  24. It's not right for your startup for you to commit your time so fully elsewhere.It's not right for your employer (to whom you have committed yourself) when your heart must be elsewhere.
    However, it is perfectly acceptable - and sometimes wise - to extend your runway by freelancing, or working casually (or even part-time) as long as your co founders, clients, bosses, and life-partner are all completely on board.

    Visit us : https://sites.google.com/site/bestessaywritingservicereview/

    ReplyDelete