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




36 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. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. Wow! This can be one particular of the most beneficial blogs We have ever arrive across on this subject. 파칭코사이트인포

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

    ReplyDelete
  15. 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
  16. 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
  17. 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
  18. 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
  19. Looking for website developers? Searching for the best web design & development services in India? Your search ends with Cybergys. We are all ears to know more about your business and become a part of your success story. Contact: +91-9830158077

    ReplyDelete
  20. Linux Magazine offers articles, reviews, and tutorials on a variety of subjects relating to Linux and open-source software.
    ¿Cuál es la ley de divorcio en Nueva Jersey?

    ReplyDelete
  21. Water damage in Toledo, Ohio, can lead to significant property issues. Whether caused by floods, leaks, or storms, swift action is crucial. Immediate water extraction, thorough drying, and effective restoration are essential to prevent mold growth and structural damage. Professional services in Toledo offer expertise in water damage mitigation, using advanced equipment to ensure a swift and thorough process.

    Addressing water damage promptly is vital to minimize long-term consequences and protect your property's integrity. If you experience Water damage toledo ohio, reach out to experienced professionals who can provide efficient and reliable solutions to restore your home or business.

    ReplyDelete
  22. For your startup to thrive, it's crucial to dedicate your full attention and energy to its success. Dividing your time and focus elsewhere can hinder its growth potential and impact your commitment to the endeavor you've embarked upon. FM Whatsapp

    ReplyDelete
  23. Stani Memorial College of Engineering and Technology truly lives up to its reputation as the best computer engineering college in Jaipur! With its state-of-the-art facilities, dedicated faculty, and focus on cutting-edge technology, it's no wonder students excel here. Proud to be associated with such an esteemed institution

    ReplyDelete
  24. Seeking assistance with your computer network assignment? Our Computer Network Assignment Help service offers expert guidance to help you grasp complex networking concepts. Whether you need help with network architecture, protocols, or troubleshooting, our team is here to support you. We provide detailed explanations, practical examples, and tailored solutions to ensure you understand the material thoroughly. With our help, you can tackle assignments confidently and enhance your knowledge of computer networks. Our goal is to make learning easier and more effective, enabling you to achieve academic success. Don't let challenging topics hold you back—let us help you master your computer network assignments today.

    ReplyDelete
  25. One of the primary advantages of using BSN writing services is access to best nursing writing services writers who possess specialized knowledge in nursing and healthcare. These professionals are well-versed in the latest research, theories, and practices within the field. Their expertise ensures that the written work is not only accurate but also reflects current developments in nursing. This specialized knowledge is essential for producing high-quality assignments that meet academic and professional standards.

    ReplyDelete
  26. This comment has been removed by the author.

    ReplyDelete

  27. Linux Magazine provides articles, reviews, and tutorials covering a wide range of topics related to Linux and open-source software.
    https://kimetsu-noyaiba.online/
    Emma

    ReplyDelete