Find the answer to your Linux question:
Results 1 to 4 of 4
Can anyone point me to where I can find a small app as described? I tried compiling the source of my favourite Windows applet for this, from: ftp://time.nist.gov/pub/daytime/ but I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Location
    13 N 80 E
    Posts
    77

    Needed: Small application for NTP synchronization to atomic server


    Can anyone point me to where I can find a small app as described?

    I tried compiling the source of my favourite Windows applet for this, from: ftp://time.nist.gov/pub/daytime/ but I get an error upon make:

    Code:
    vasudevan@yos daytime $ make
    cc -o sw.o -c sw.c
    sw.c: In function `sw':
    sw.c:43: warning: conflicting types for built-in function 'sscanf'
    vasudevan@yos daytime $
    Please advise. Thanks. Either a small equivalent app(let) to do the same job under KDE, or instructions to debug the above will help.

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    if you want something to set your time just write a script like
    Code:
    #!/bin/bash
    
    ntpdate server
    and replace server with the server you want to use. Once you have written the script you can make it executable with
    Code:
    chmod +x scriptname
    and then you can add it to a cronjob so that it runs every hour or so
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Location
    13 N 80 E
    Posts
    77
    Quote Originally Posted by dylunio
    add it to a cronjob so that it runs every hour or so
    Hey, thanks! But how do I do this "cronjob" thing? (Only now shaking off the first shrouds of Linux-ignorance...)

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    cron is a program that lets you set times to run programs. So to edit the crontab do
    Code:
    su
    [rootpass]
    crontab -e
    then fill in a line like the following:
    0 * * * * /path/to/script
    and save and exit. Replace /path/to/script with the path to the script you made, and it will run that script ever hour on the hour
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •