Page 1 of 2 12 LastLast
Results 1 to 15 of 28

Thread: Problem with simple cron jobs

  1. #1

    Cron drived connection

    Hi everybody,

    In order to keep my money, I've changed for a low cost Internet Provider (Erevia) to connect via ISDN (because I can't get ADSL before next century).
    This provider may let me staying connected 12 hours per 12 hours (i.e. from 7am to 7pm with 1 login/pwd and from 7 pm to 7 am with another login/pwd).
    If I stay connected with the bad login I'm charged.

    I have 2 ISDN routers but none of them can get 2 kind of connection differentiated by the time.
    So I wonder if, with the help of Crond, I can connect via router #1 (with a fixed IP address) if time is between 7 am and 7pm and via router #2 (with another IP address) if time is between 7pm and 7am. I also need to disconnect @ 6:59am an reconnect @7:01.

    I get WL500g with the nice Oleg FW 1.9.2.7-3c and it works really nice.

    Thank you very much for your help !

    Regards

    Oldudu

  2. #2

    crond problem

    I have problem with crond. When I define very simple command to run in crontabs like this:
    30 * * * * mkdir /tmp/harddisk/a
    is it ok but when I define something like this:
    30 1 * * * mkdir /tmp/harddisk/a
    the command is not run. I tried also 30 01 .............. with the same result.
    The commands on lines 3 - 6 aren't working (see attachment).

    Where is problem?

    I´m using Asus WL500b, last Oleg's FW and crond which is in busybox which is downloaded form Direct Downloads from here.
    And some interesting thing : my crontab file must be named admin not root. With name root it isn't working at all.
    Attached Files Attached Files

  3. #3
    I don't know much about cron, but I can give you these suggestions: check the syslog; check some guides on Google.

  4. #4
    There is no problem in syslog, and the commands are maybe good. Controled with linux.about.com and others www Linux pages.

  5. #5
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    There's a howto about cron in the HOWTO section...But perhaps that doesn't solve your problem....anyway, check it out.

  6. #6
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Quote Originally Posted by kamilek
    I have problem with crond. When I define very simple command to run in crontabs like this:

    is it ok but when I define something like this:

    the command is not run. I tried also 30 01 .............. with the same result.
    The commands on lines 3 - 6 aren't working (see attachment).

    Where is problem?

    I´m using Asus WL500b, last Oleg's FW and crond which is in busybox which is downloaded form Direct Downloads from here.
    And some interesting thing : my crontab file must be named admin not root. With name root it isn't working at all.
    crond is already included in the firmware, so try with built one.

  7. #7
    So the problem is solved! Crond from Oleg's FW is working without problems,but Cron from Download section has some problem with time. It "thinks" that the time is for example not 20:00 but 18:00. So the commands were done with 2 hours delay!

  8. #8
    I have had a similar problem with awk. When ever I run a date command or a script containing a date command from command line I get UTC time, and not my timezone. If however the same script is started by crond the time is correct. Strange...

    If I run the date applet from full busybox I get:
    Tue Apr 12 06:25:51 UTC 2005
    The built in date however shows:
    Tue Apr 12 08:25:58 METDST 2005

    Not a big problem, but is there a way to make full busybox show local time?

    S.

  9. #9
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    unslung contains busybox package - I hope it's "full". Try using it (you could just try to extract binary from the ipk).

  10. #10
    Join Date
    Dec 2004
    Location
    Grimstad, Norway
    Posts
    19

    Problem with simple cron jobs

    I want to execute a simple cron job every minute. My /var/spool/cron/crontabs/admin contains this line:

    Code:
    * * * * * /tmp/harddisk/bin/camsrv -r VGA -f /tmp/harddisk/tmp/display.jpg -D /dev/video
    My post-boot script contains this line:
    Code:
    crontab /var/spool/cron/crontabs/admin
    But it does not start. The command will not execute. I can't even get cron started manually. Can comeone help me?

    I use Olegs 1.9.2.7-5a firmware.

    Thanks.

  11. #11
    Join Date
    May 2004
    Location
    Moscow, Russia
    Posts
    50
    Quote Originally Posted by Muffe
    I want to execute a simple cron job every minute. My /var/spool/cron/crontabs/admin contains this line:
    Code:
    * * * * * /tmp/harddisk/bin/camsrv -r VGA -f /tmp/harddisk/tmp/display.jpg -D /dev/video
    My post-boot script contains this line:
    Code:
    crontab /var/spool/cron/crontabs/admin
    But it does not start. The command will not execute. I can't even get cron started manually. Can comeone help me?
    I use Olegs 1.9.2.7-5a firmware.
    Thanks.
    In post-mount it should be
    Code:
    /usr/sbin/crond
    Crontab program is only used for manipulating cron schedules, cron itself is crond.

    HTH,
    Roofcat

  12. #12
    And make sure to add /var/spool/cron/crontabs/admin to /usr/local/.files

    S.

    PS: Did you see the howto? http://wl500g.info/showthread.php?t=1058

  13. #13
    Join Date
    Dec 2004
    Location
    Grimstad, Norway
    Posts
    19
    Thanks, RoofCat. I have changed the line in the post-mount file, and that did the trick.

    Barsju: Yes, I followed the HOWTO, but it seemes like it containes an error. You wrote this:
    Code:
    echo "crontab" >> /usr/local/sbin/post-boot
    . This did not work for me, and I changed this line into /usr/sbin/crond and it worked. I use the 1.9.2.7-5a firmware.

  14. #14
    Right you are. Sorry for that. I should test my scripts before writing howto's..

    Anyways, thanx for headsup. I fixed the howto now so others shouldn't get same problem..

    S.

  15. #15

    cron

    Hi,

    i have read the tutorial about installing cron with 1.9* firmware. But to do this I need USB-HDD or similar. But i haven't one.
    First point in the turorial is installing cron with ipkg. why i have to install cron again? there is a crond and crontab on my wl500g.

    but there is always this errormessage:
    crontab: cannot change dir to /var/spool/cron/crontabs: No such file or directory
    when i want to start crontab.

    what's the problem now? need i usb hdd for using cron? are'nt there other ways.

    greeting joe

Page 1 of 2 12 LastLast

Similar Threads

  1. Simple clients signal level measuring
    By pekr in forum WL-500g Custom Development
    Replies: 8
    Last Post: 20-12-2005, 05:15
  2. Add Crontab jobs to images
    By DerFuchs in forum WL-500g Custom Development
    Replies: 6
    Last Post: 11-05-2005, 08:27
  3. Replies: 13
    Last Post: 22-12-2004, 17:27
  4. Simple ICS via PC in XP
    By davidsanton in forum WL-138g [Marvell Chipset]
    Replies: 1
    Last Post: 16-10-2004, 09:10

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •