0
votes
1answer
50 views

Binding timestamp value to a variable in crontab

I'm basically trying to declare a variable with a date() value in crontab as I will constantly be using the same date structure over and over, here is what my crontab looks like so far. php = ...
0
votes
1answer
144 views

Is it better to use the systemd service unit's Restart & RestartSec, or use a systemd timer unit?

I have a couple of in-house automated scripts running at periodic intervals. One is every five minutes, the other is every minute. They don't really need to be ran on-the-dot; e.g. I don't care if ...
1
vote
1answer
138 views

Weird syslog order

Have you ever seen wrong order in /var/log/syslog ? I think that it causes only crontab. Jun 28 22:20:01 alex CRON[2327]: (root) CMD (something > /dev/null) Jun 28 22:21:01 alex CRON[2700]: (root) ...
-1
votes
1answer
61 views

Crontab not executing [duplicate]

I'm running CentOS 6.2, trying to run tasks through cron. I've verified crond is running $ service crond status crond (pid 20553) is running... I have no /etc/cron.allow file, but I do have an ...
0
votes
1answer
263 views

Review of a crontab script to add timestamps to minutely runs; any suggestions?

I've got a crontab job set to run minutely as such: * * * * * /home/username/public_html/domain.tld/production/scripts/cron_runner.sh My goal is to add some timestamps to output from cron so I can ...
0
votes
1answer
319 views

running cron once a minute 8am-8pm

i need to run cron job once a minute 8a.m. - 8p.m. my code is: */01 8-20 * * * user /usr/bin/php -f script.php > /dev/null but it seems to fail..
5
votes
2answers
195 views

date +%s glitches

I have a strange issue I'm starting to troubleshoot and wondered if anyone would have any helpful tips. I have a cronjob executed every minute that executes a script and appends the output to a file ...
1
vote
2answers
88 views

Run a job once at a specific time

I'm trying to create a cron that will run one time at a specific time. For simplicity, how can I create a cron that will run at 11:57PM and print "Hello" to the screen then delete itself? (Cent OS 5) ...
1
vote
3answers
380 views

Time cron not working

10 * * * * /usr/sbin/ntpdate pool.ntp.org >/dev/null 2>&1 The idea is to sync time every 10 minutes. However im waiting now for 15 minutes and nano /var/log/cron still returns ...
3
votes
1answer
273 views

How precise is cron?

Hey everyone. I am trying to set up a python script to query a DB for all updates over the past 5 minutes. Given the number of updates, it must be as precise as possible (our records are timestamped ...
1
vote
1answer
1k views

Crontab : is there any log with begin and end time?

I have a lot of crontask on my linux servers for our applications. But I don't find any way to know when a task end, and how long it run. Must I add a soft like time command to log this? Is there any ...
2
votes
1answer
229 views

Why does the time it takes to run this script differ so much between user and system and how I might correct the discrepancy?

My application sits behind a load balancer, and every once in a while I like to do a status check on each machine to get an idea of the time it takes to return an index.html document on each machine. ...
3
votes
2answers
113 views

Testing application timing

We've developed an in-house application, with several related crons that execute at some time during the day. These crons are designed in such a way that they make sure that they ignore, for example, ...
2
votes
2answers
195 views

If crontab executes at midnight, what will the current date be?

I have the following entry in cron: 0 0 * * * /path/to/script.sh in script.sh, there's a call to: date +%Y%m%d Even if this executed in zero-time, I'm assuming that the value of date will be for ...
0
votes
4answers
310 views

wordpress, cron & time - does time on server affects plugins? how to fix it? (virtualbox)

I'm running wp on lamp install in virtual machine. I frequently pause it, save snapshots, etc. Date and time aren't correct because of this and i think i noticed weird behavior of plugins that use ...