cron in debian is not executing a script at the scheduled time
Hi there,
I'm new to the boards so I didn't know what is the appropriate place to post this in... if the place is wrong the mods can move the thread to its place... anyhow, I purged arch linux from one of my vps'es and installed debian6. restored my configs and data and was up and running in no time, but... I noticed that my cron is 'not' working as expected. what I mean by this is that it is working and executing my bash scripts but is not executing them at the time set... for example, this is what I have in my 'crontab -l': Code:
┌─[06:37:49]-[root@gordon]-[/etc/nginx] Code:
┌─[07:25:40]-[root@gordon]-[/etc/nginx] Code:
┌─[07:26:39]-[root@gordon]-[/etc/nginx] Code:
┌─[07:26:48]-[root@gordon]-[/etc/nginx] Code:
┌─[07:26:48]-[root@gordon]-[/etc/nginx] if someone can just sched some light to me it would be great as I'm in a `while true` loop for more than an hour trying to figure this out with no success thanks, - d |
What can be found int the subject of the mail sent by the cronjob? "GORDON: Backup report => $(date)"
I can only imagine some tricky timezone settings. |
Hey, pan64 thanks for your prompt reply. Here's what the subject looks like:
Code:
GORDON: Backup report => Tue Sep 18 13:59:01 CEST 2012 Code:
┌─[07:58:52]-[root@gordon]-[/etc/nginx] |
Hi educated,
You said that your script is executing but at different time. So, sure the problem is of time or time zone on your system. |
I would try to compare the environment (that means you execute set in a cronjob, save the output and compare it with set executed in a normal shell)
|
i've put this to run with set -x
Code:
*/5 * * * * /usr/bin/bkpTool 2>&1 | mail -s "GORDON: Backup report => $(date)" e@mail.com Code:
*/1 * * * * env > /tmp/env.cron |
and what is the env of a normal shell?
|
here's the difference between them:
Code:
┌─[08:23:35]-[root@gordon]-[~] |
ok, this is solved by running:
Code:
┌─[08:33:16]-[root@gordon]-[~] marking this as [SOLVED] ... what a waste of time ... but still interesting .... thank you all for your inputs. take care, - d EDIT: Sorry, but how would I go editing the subject and appending [SOLVED] to it? EDIT2: Ok, found it at the top-right ..... I'm kinda tired was working 3rd shift all night long ... |
All times are GMT -5. The time now is 09:16 AM. |