Auto Announcement issues

Results 1 to 10 of 10
  1. #1
    Sorcerer Supreme norman1234 is offline
    Member +Rank
    May 2009 Join Date
    303Posts

    Auto Announcement issues

    I have tried many ways to do Auto Announce

    http://forum.ragezone.com/f452/auto-announce-679771/

    even did 343s package.. didnt even modify anything and waited half a day and no announce.. although i did change the ip and port for the server.

    i have also edit cron by manualy.. doing crontab -e and adding everything in
    it still dont work..although when i do edit it manually and save it.. it goes into /var/spool/cron/crontabs

    idk if this has anything to do with it.. or how it reads it.. as i know the guides shows it in /etc/ folder
    so any ideas on how to fix it?


  2. #2
    Black Magic Development das7002 is offline
    Grand MasterRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Auto Announcement issues

    What are you using as the crontab?
    What happens when you call the jsp from a browser?

    More details are needed to get answers, we aren't magical psychic mind-readers that know everything about all problems

  3. #3
    Newbie twiggy345 is offline
    MemberRank
    Jun 2010 Join Date
    24Posts

    Re: Auto Announcement issues

    ok when i went to my pwadmin/AA/aa1.jsp it said Successfully Sent Broadcast Message!

    So i dont know why Crontab isnt calling it. here is where i installed my files

    I went and put Crontab in <root> etc/
    then i put my aa1.sh in <root> etc/cron.pw
    then i put my aa1.jsp in <root> root/apachetomcat/webbapps/pwadmin/aa

    I have a feeling that they are all in the wrong Directory tho

    THen i went and edited it so that it calls aa1.jsp every 5 mins ( so i dont have to wait long when testing)

    I have rebooted Linux and also have used the stop cron; and the start cron
    Which both successful in stopping and restarting. So im kinda lost too.
    Last edited by twiggy345; 10-02-11 at 04:53 AM.

  4. #4
    Sorcerer Supreme ivanaivana is offline
    Member +Rank
    Oct 2010 Join Date
    RussiaLocation
    323Posts

    Re: Auto Announcement issues

    Quote Originally Posted by norman1234 View Post
    I have tried many ways to do Auto Announce

    http://forum.ragezone.com/f452/auto-announce-679771/

    even did 343s package.. didnt even modify anything and waited half a day and no announce.. although i did change the ip and port for the server.

    i have also edit cron by manualy.. doing crontab -e and adding everything in
    it still dont work..although when i do edit it manually and save it.. it goes into /var/spool/cron/crontabs

    idk if this has anything to do with it.. or how it reads it.. as i know the guides shows it in /etc/ folder
    so any ideas on how to fix it?
    http://forum.ragezone.com/f452/auto-...d-help-720233/

  5. #5
    [B]aSH nofxpunkerbrian is offline
    Grand MasterRank
    Apr 2009 Join Date
    1,151Posts

    Re: Auto Announcement issues

    My auto announces on my cron go like this:

    15 * * * * lynx http://localhost:8180/iweb/passwordbroadcast.jsp
    30 * * * * lynx http://localhost:8180/iweb/votebroadcast.jsp
    45 * * * * lynx http://localhost:8180/iweb/helpbroadcast.jsp

    Your more than likely forgetting to open the jsp file via a web package, lynx is a good one for this kind of area.

  6. #6
    Black Magic Development das7002 is offline
    Grand MasterRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Auto Announcement issues

    Quote Originally Posted by nofxpunkerbrian View Post
    My auto announces on my cron go like this:

    15 * * * * lynx http://localhost:8180/iweb/passwordbroadcast.jsp
    30 * * * * lynx http://localhost:8180/iweb/votebroadcast.jsp
    45 * * * * lynx http://localhost:8180/iweb/helpbroadcast.jsp

    Your more than likely forgetting to open the jsp file via a web package, lynx is a good one for this kind of area.
    Actually... wget -O/dev/null http://localhost:8180/somebroadcast.jsp

    would be a better choice

  7. #7
    Sorcerer Supreme norman1234 is offline
    Member +Rank
    May 2009 Join Date
    303Posts

    Re: Auto Announcement issues

    Quote Originally Posted by das7002 View Post
    Actually... wget -O/dev/null http://localhost:8180/somebroadcast.jsp

    would be a better choice
    i done alot of testing.. and i couldnt get the lynx working.. but with das wget one it worked.. both for the ip and localhost.

  8. #8
    Newbie twiggy345 is offline
    MemberRank
    Jun 2010 Join Date
    24Posts

    Re: Auto Announcement issues

    I used the one das used also with localhost and got it working. But i created a crontab for root also. So if u use crontab -e and put in the new
    info there it will setup a new cron for the usr root. Just remember if u go this route that u have to point it to ur broadcast. the one das shows is the best one to use. But thats my opinion and thank all of u for helping with this issue

  9. #9
    SON OF MARFEL hrace009 is offline
    Grand MasterRank
    Apr 2009 Join Date
    Pekanbaru, IndoLocation
    1,035Posts

    Re: Auto Announcement issues

    make a script

    put this at your crontab, or do it with webmin for the easy way
    Code:
    cd /cron
    ./job1.sh
    in job1.sh put this:
    Code:
    rm broadcast.jsp
    wget http://YOUR IP:8080/broadcast.jsp
    rm broadcast.jsp
    in broadcast.jsp put this:
    Code:
    <%@page contentType="text/html; charset=GBK"%>
    <%@page import="java.lang.*"%>
    <%@page import="java.util.*"%>
    <%@page import="java.text.*"%>
    <%@page import="org.apache.commons.lang.StringEscapeUtils"%>
    <%@page import="protocol.*"%>
    <%@page import="com.goldhuman.auth.*"%>
    <%@page import="com.goldhuman.util.*"%>
    <%@page import="org.apache.commons.logging.Log"%>
    <%@page import="org.apache.commons.logging.LogFactory"%>
    <%@page import="java.io.*"%>
    <%@page import="java.sql.*"%>
    <%
            //
            // Coded by [B]aSH from Vendetta Gaming Network.
            // 
    String msg = "YOUR MESSAGE";
    try {
            protocol.DeliveryDB.broadcast((byte)9,-1,msg);
    }
    catch (Exception e)
    {
            out.println("<font color=red>Error Attempting to Broadcast Message!</font>");
    }        
    %>
    <%
    out.println("<font color=green>Successfully Sent Broadcast Message!</font>");
    %>
    Last edited by hrace009; 11-02-11 at 07:45 AM.

  10. #10
    Nerd-IO Romulan is offline
    Grand MasterRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: Auto Announcement issues

    Quote Originally Posted by nofxpunkerbrian View Post
    My auto announces on my cron go like this:

    15 * * * * lynx http://localhost:8180/iweb/passwordbroadcast.jsp
    30 * * * * lynx http://localhost:8180/iweb/votebroadcast.jsp
    45 * * * * lynx http://localhost:8180/iweb/helpbroadcast.jsp

    Your more than likely forgetting to open the jsp file via a web package, lynx is a good one for this kind of area.
    It needs lynx installed btw...

    CONSOLE~: apt-get install lynx



Advertisement