cron at specified time
See the attachment! This forum blocks some words inside the output
- Attachments
-
- ps aux.zip
- "ps aux" output
- (640 Bytes) Downloaded 300 times
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Well, both sntp and cron are operational, so you should not have a problem. It may be perhaps because of how cron works. Do all the other cron jobs work?
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
Yes, I think, viewing log file:
Jan 31 01:00:01 | USER root pid 648 cmd /usr/local/bin/memopt.sh& }/dev/null 2}&1
Jan 31 01:00:01 | USER root pid 650 cmd /usr/local/bin/chksync.sh& }/dev/null 2}&1
Jan 31 02:00:01 | USER root pid 731 cmd /usr/local/bin/memopt.sh& }/dev/null 2}&1
Jan 31 02:00:02 | USER root pid 733 cmd /usr/local/bin/chksync.sh& }/dev/null 2}&1
Jan 31 02:00:02 | USER root pid 734 cmd cat /proc/avalanche/avsar_modem_stats | grep Attenuation | logger
Jan 31 02:00:02 | DS Line Attenuation: 36 DS Margin: 12
Jan 31 02:00:02 | US Line Attenuation: 20 US Margin: 12
Jan 31 01:00:01 | USER root pid 648 cmd /usr/local/bin/memopt.sh& }/dev/null 2}&1
Jan 31 01:00:01 | USER root pid 650 cmd /usr/local/bin/chksync.sh& }/dev/null 2}&1
Jan 31 02:00:01 | USER root pid 731 cmd /usr/local/bin/memopt.sh& }/dev/null 2}&1
Jan 31 02:00:02 | USER root pid 733 cmd /usr/local/bin/chksync.sh& }/dev/null 2}&1
Jan 31 02:00:02 | USER root pid 734 cmd cat /proc/avalanche/avsar_modem_stats | grep Attenuation | logger
Jan 31 02:00:02 | DS Line Attenuation: 36 DS Margin: 12
Jan 31 02:00:02 | US Line Attenuation: 20 US Margin: 12
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
In which case the other one will work (eventually) if you let it be.
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
I think you will need to read up on the crontab manuals - particularly the busybox cron applets. But it is best to have the cron jobs in place before crond is executed (which means an "RT_init_x" or "RT_cmd_x" setting).
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
I guess the eye-rolling means that you are unwilling to read the cron manuals for yourself, but you would prefer someone else to read them for you and tell you what is in them? If so, then you've come to the wrong place.
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
Mmm, my main problem is that I am italian and I don't understand (and write) well english... however I read the manual (http://sharedhosting.net/support/crontab/man.html) and I found (I think) the problem:
In reference to "-e" option! At this time I can't try because I'm not in my home, (d'oh ) but as soon as possible I try and say you the result!Note: All crontab jobs should be submitted using crontab; you should not add jobs by just editing crontab file because cron will not be aware of changes made this way.
I finally managed to make crontab see the new job! I made it setting the editor this way as default:
and using CRONTAB -e command
I then, after various tries, due to the previous syntax errors, added the wget command this way:
The problem now is that it looks like it's being executed but it actually isn't!
Log says:
but the script is not being executed ! If directly use "wget -q http://www.mysite.com/script.php" instead, it's perfectly performed. I've been looking everywhere in the Internet and I keep on finding always the same examples, but they won't work...where am I doing wrong? =(
PS: my girlfriend's helping me with my English, that's why my language has suddently improved XD
Code: Select all
export VISUAL='edit'
I then, after various tries, due to the previous syntax errors, added the wget command this way:
Code: Select all
* * * * * wget -q http://www.mysite.com/script.php
Log says:
Code: Select all
Feb 2 00:49:01 | USER root pid 658 cmd wget -q http://www.mysite.com/script.php
Feb 2 00:51:01 | USER root pid 667 cmd wget -q http://www.mysite.com/script.php
Feb 2 00:52:01 | USER root pid 672 cmd wget -q http://www.mysite.com/script.php
but the script is not being executed ! If directly use "wget -q http://www.mysite.com/script.php" instead, it's perfectly performed. I've been looking everywhere in the Internet and I keep on finding always the same examples, but they won't work...where am I doing wrong? =(
PS: my girlfriend's helping me with my English, that's why my language has suddently improved XD
- Shotokan101
- RouterTech Team
- Posts: 4779
- Joined: Thu Jan 26, 2006 3:17 pm
- Location: Glasgow, Scotland
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
I think there may be an issue with busybox crond and external commands. I'll investigate further over the next few days ...
Edit: investigated - no issues found - all is well.
Edit: investigated - no issues found - all is well.
Last edited by thechief on Tue Feb 03, 2009 11:59 pm, edited 1 time in total.
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
- biro
- RouterTech Team
- Posts: 1274
- Joined: Wed Jan 25, 2006 10:03 pm
- Location: Letchworth Garden City, ENGLAND
- Contact:
Does script.php actually get downloaded ?
Think you will need to specify the download dir
even then may need to set permisssions and the execute the script.
Think you will need to specify the download dir
Code: Select all
wget -q -P/var/ http://www.mysite.com/script.php
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Yes, indeed.biro wrote:Think you will need to specify the download dirCode: Select all
wget -q -P/var/ http://www.mysite.com/script.php
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
I've tried and now i have this error:
Code: Select all
Feb 3 21:31:01 | failed user root parsing http://www.mysite.com/script.php
Feb 3 21:31:01 | USER root pid 476 cmd wget -q -P/var/
Feb 3 21:32:01 | USER root pid 510 cmd wget -q -P/var/
...