how to auto-run ntdpdate command?

Solution 1:

No need to use cron for this task. Much better to install and configure ntpd (special daemon for continuous time sync).

  1. sudo yum install ntp
  2. sudo chkconfig ntpd on
  3. sudo nano /etc/ntp.conf
  4. you are from Argentina, right? comment/remove all the default CentOS ntp servers, you can add your own time-servers for Argentina, for example

    server 0.ar.pool.ntp.org
    server 1.south-america.pool.ntp.org
    server 0.south-america.pool.ntp.org
    
  5. After you are done with the configuration, just start the ntp service: sudo service ntpd start

  6. To check if the NTP service is synchronizing:

    sudo ntpq -pn
    sudo tail -f /var/log/messages
    

Solution 2:

Instead of using ntpdate which resets time hardly at once, consider using NTP daemon (ntp packet). It slows down or fastens system clock to match NTP-server.