Results 1 to 7 of 7

Thread: Is Crontab working in BT4-PreF? (It's not in Beta)

  1. #1
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default Is Crontab working in BT4-PreF? (It's not in Beta)

    My mobile phone was stolen yesterday so I had no alarm clock to wake me up this morning, so last night I tried to use Crontab to play an audio file, but couldn't get it to work.

    I think the last time I used Crontab as an alarm clock was when I was using Xubuntu, and it worked fine, but I just couldn't get it working in BT4beta (note that I'm using Beta).

    So is Crontab working in BT4-PreFinal?

    I ended up doing "apt-get install kalarm-kde3", but then that program wouldn't work! When the alarm time arrived it just spat out "Can't execute the command"

    So after losing about an hour's sleep pissing around trying to get an alarm clock, I eventually resorted to writing a C program that waits for 5 hours and then plays an MP3:

    Code:
    #include <unistd.h>   /* sleep */
    #include <stdlib.h>   /* system */
    
    int main(void)
    {
        sleep(5u * 60 * 60);
    
        system("mpg123 ~/storage/music/legally_backed_up/haha_yeah_right/oasis/talk_tonight.mp3");
    
        return 0;
    }
    It worked a charmed but I cuda done with the extra hour's sleep I spent pissing about trying to get an alarm clock!

    Anyway back to the point, is Crontab working in the Pre-Final?
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

  2. #2
    Member imported_vvpalin's Avatar
    Join Date
    Apr 2009
    Posts
    442

    Default

    Man did i just lol

    Ya cron doesn't seem to be working in the pre either, i wanted to write a ssh connect back script last night and have cron make sure it was up ever 10min or so. It was a no go and i ended up writing the thing in perl .. funny enough after an hour or so.

    I could be wrong, or could just not know how to activate it, but it sure doesn't seem to be working for me.
    Using backtrack for the first time is like being 10 years old again with the keys to a Ferrari.

  3. #3
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default

    I have a feeling the two of us might just be retards though, we probably just have to do something like:

    Code:
    cron --turn-on
    Anyone know how to get it going?
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

  4. #4
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    Well if you are not running as root you have to add your user to the cron group.

  5. #5
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default

    I tried to get it working under root with BT4beta, but no joy.

    Can anyone try it out under root with BT4-PreFinal and see if it works?
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

  6. #6
    Senior Member fnord0's Avatar
    Join Date
    Jul 2008
    Posts
    144

    Default

    Quote Originally Posted by Virchanza View Post
    Can anyone try it out under root with BT4-PreFinal and see if it works?
    tested, and works as root, with only doing the following ;;

    created a file /usr/sbin/crontest
    Code:
    # cat /usr/sbin/robtest
    
    #!/bin/bash
    echo "test 123" > /root/crontester
    ran crontab ::
    Code:
    # crontab -e
    added this line ::
    */1 * * * * /usr/sbin/fnord0crontest
    waited.....
    Code:
    # cat /var/log/syslog
    ......................
    Jul  1 09:14:01 leviathan /USR/SBIN/CRON[21756]: (root) CMD (/usr/sbin/fnord0crontest)
    Code:
    # pwd
    /root
    # ls -al crontester
    -rw-r--r-- 1 root root 9 Jul  1 09:14 crontester
    # cat crontester
    
    test 123
    that file /root/crontester was not there until cron created it.... (FYI), so cron looks to be working just fine in BT4pf
    'see the fnords!'

  7. #7
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    Works fine for me as well as root

Posting Permissions

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