Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
My application is running on Linux server, Every three or four days, server time and EST time have different between 2 to 40 seconds. Is there any way to keep sync timing with NTP on daily basis.
The application is running 24X7, so can't reboot everyday to sync. Right now we are manage this problem by set time manually.
Thanks and appreciate.
Add a simple cron job to run ntp at whatever time you wish.
#Set time
0 0 * * * /usr/sbin/ntpdate ntp2.ja.net
Related
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a Script that is supposed to be execute by the crontab. How can I verify this at this moment if the task was programmed to be executed several hours ago?
You should modify your crontab file by adding a MAILTO=<your email here> before your cron so that you will be emailed the results of the execution. This won't solve your problem of knowing if the script executed in the past, but it may help you avoid this issue in the future. To make sure you get an email, just add an echo "Running script!" line to the top of your script.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
This is the current running cronjob :
2 1 * * * cd /var/www; php auto.php
that says it will be run everyday # 1:02 AM ... How can i make it to run # 1:02:05 everyday?
It's not possible as the cron can only run in minutes interval at minimum.
What you can do to achieve the same effect is to have delay in your script as the fist line:
sleep(5); // sleep for 5 seconds
This way the script actually starts at 1:02:05.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have log file named TTY_00000000.log on my server which is of more then 2GB.
Can anyone let me know whether I can empty this file & how can I stop creation of this huge logs or minimize them in anyway?
Thanks,
Gaurav.
See this thread. Quotes:
These are a very important debugging tool for the PERC 5 controllers so
the ability to disable them is not exposed.
What you need is a simple logrotate script (Dell should have included one). Compression would save almost all the space since they are a lot of repetitive text.
cat > /etc/logrotate.d/omsa-tty <<EOF
/var/log/TTY_00000000.log {
monthly
notifempty
rotate 15
compress
}
EOF
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am using sphinx for searching. I get new data everyday which is added in the database.
I have to add this data into the sphinx search index so that it can be searched. For that I need to reindex the sphinx search index at regular intervals.
How can I set a cron in linux to do so?
a crontab is defined like this:
MIN HOUR DOM MON DOW CMD
so if you want to run a task on a daily basis try:
0 0 * * * /path/to/your/script
that will trigger the launch of your script everyday at 0:00
For more details, see the cron tag wiki
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I would like to schedule a cron to take backup of my database every three days at mid-night.
So, is this correct?
0 0 */3 * * /usr/bin/mysqldump -hhost_ip -uusername my_db_name -ppassword > my_backup.sql
This question might have asked earlier, but I just want to confirm this.
Thanks. Any help would be of immense help!
no.
you miss user
# m h dom mon dow user command