Coder Social home page Coder Social logo

Comments (2)

mmitche avatar mmitche commented on May 25, 2024

@iamjasonp Is this typically run as a daemon on Linux or run on-demand?

from dotnet-ci.

iamjasonp avatar iamjasonp commented on May 25, 2024

You can use ntpdate to adjust time on demand, or install ntpd (sudo apt-get install ntp) for continuous correction. Note however that installing ntpd will cause a server to be opened up on the machine too so others can sync time from it - not necessarily desired behaviour.

Using (say) sudo ntpdate 0.pool.ntp.org as a cron job works (I think it's already on-box by default on ubuntu and other distros) but will probably result in more drift compared to ntpd. That said, this drift should be well within our tolerance if we run ntpdate even weekly. Note that ntpdate needs superuser privileges to set the system time.

I personally use ntpd on my box to keep time on my linux boxes because I'm lazy and don't really care about any incoming ntp connections. (the default /etc/ntp.conf is good enough for me)

Using the cron job, be sure to edit the sudoers file to allow sudo without password for ntpdate for whichever user you use to run the time sync.

NINJA EDIT: Added sudo to ntpdate command example above

from dotnet-ci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.