[ADMN] SimpleCronClone v0.5, A cron-like scheduling system [1337]

Discussion in 'Inactive/Unsupported Plugins' started by Bobby_Bonsai, Feb 27, 2011.

  1. Offline

    H4Mm3r

    Hi, nice plugin ! Supported on 766 ?
     
  2. Offline

    Sekonda

    Has anyone tested for #803? Would be nice to have a reload every 3 hours.
     
  3. Offline

    Bobby_Bonsai

    @Sekonda: There have been no API changes between 733 and 803. I also tested it and it works.
     
  4. Offline

    taesheren

    #953 seems to have broken this.
    Commands only return the command syntax, /cron_exec returns "/cron_exec <script>..." and so on.

    I also had problems running bash from both the .scc and the external .sh file.
    Code:
    execWait bash sleep 5
    // 2011-07-02 03:33:53 [SEVERE] Cannot run program "bash": CreateProcess error=2, The system cannot find the file specified
    
    # countdown.sh is in the same directory as the tab
    execWait countdown.sh
    // 2011-07-02 03:40:40 [SEVERE] Cannot run program "countdown.sh": CreateProcess error=2, The system cannot find the file specified
     
  5. Offline

    admalledd

    works for me, however i have the full path to the executable i am running (eg "execWait /home/admalledd/minecraft/cur/sh/master_backup.sh")

    i am running craftbukkit 953 quite happily now
     
  6. Offline

    walruscode

    I can confirm this is working on CraftBukkit RB 953. I'm using it to reload permissions every 15 minutes to reload VIPs' custom ranks, as I made a feature on my server's website that allows VIPs to change their own rank.

    I just want to say, I was incredibly happy to find this plugin when I thought "I absolutely need a cron-like plugin for this to work". Awesome work Bobby_Bonsai.
     
  7. Offline

    Niles

    Working on 974. I have used this plugin ever since it came out and am very happy with it. great work :D
     
  8. Offline

    Niles

    wow this plugin has gone a long time without anyone commenting.
     
  9. Offline

    HWei

    Awesome plugin. Exactly what I want!
    Seems still be able to work on #1185? :)
     
  10. Offline

    gabripj

    How i put seconds on tab file?
     
  11. Offline

    Niles

  12. Offline

    gabripj

    ohh but have a way to i chose a command wait to do?
    do wait 30 say Hello World
    like this??
     
  13. Offline

    Niles

    err, I don't think that works.
     
  14. Offline

    Bobby_Bonsai

    Why would you want that? Anyway, on any half decent operating system there's a "sleep" command which could be utilized for that.

    Code:
    execWait sleep 30
    
     
  15. Offline

    Niles

    @Bobby_Bonsai I was going to say that but I don't know if it works on windows
     
  16. Offline

    Bobby_Bonsai

    @Niles: I'm not sure if the Server versions do have such a command, the Desktops certainly don't.
     
  17. Offline

    controlbreak

    I report this plugin is working fine to me on 1.0.1 R1.
    Anyway, I would like to have someone's opinion after a code review.
     
  18. Offline

    Bobby_Bonsai

    Thanks for reporting.

    But I'm not sure what you mean with a code review? There are only three points of interactions with the server in the plugin:

    * Main Plugin (enabling/disabling)
    * Setting the commands
    * Sending commands

    The scheduling-logic is completely separated from the server. So if it does not throw any exceptions during load it should work fine.

    Now that you mention it...the names suck a little bit...
     
  19. Offline

    controlbreak

    Hello !
    This is the best "code review" I could get : a confirmation by the author that the plugins should work ok with 1.0.1.
    Thanks a lot !
     
  20. Offline

    Bobby_Bonsai

    You're welcome.

    Ahm, I was not quite correct, though. It could be that the sending of commands is broken. Just copy the simple "Hello World!" example and execute it once with "cron_execute HelloWorld.scc" to test that, too. If that is working, I see no reason why it should not work.
     
  21. Offline

    efstajas

    Great! Will the following work?
    I want to open the mobarena of my server every weekend. Friday at 00:05, (05 because there is a restart at 12:00) it should do /ma enable and on sunday at 00:05 /ma disable.
    tab.ssc
    Code:
    6 * * 0 5 enable.scc
    1 * * 0 5 disable.scc
    enable.scc
    Code:
    do ma enable
    disable.scc
    Code:
    do ma disable
    Bobby_Bonsai Did I get it right?
     
  22. Offline

    Niles

    efstajas likes this.
  23. Offline

    efstajas

    Okay, thanks! :)

    Well, it says the following:
    Code:
    2012-02-08 15:05:28 [SEVERE] Error occurred while enabling SimpleCronClone v0.4 (Is it up to date?): invalid pattern "6 * * 0 5". Error parsing months field: invalid field "0", invalid element "0", invalid range, invalid value "0", invalid alias "0".
    it.sauronsoftware.cron4j.InvalidPatternException: invalid pattern "6 * * 0 5". Error parsing months field: invalid field "0", invalid element "0", invalid range, invalid value "0", invalid alias "0".
        at it.sauronsoftware.cron4j.SchedulingPattern.<init>(Unknown Source)
        at it.sauronsoftware.cron4j.Scheduler.schedule(Unknown Source)
        at it.sauronsoftware.cron4j.Scheduler.schedule(Unknown Source)
        at org.bonsaimind.bukkitplugins.SimpleCronCloneHelper.parseTabLine(SimpleCronCloneHelper.java:117)
        at org.bonsaimind.bukkitplugins.SimpleCronCloneHelper.readTab(SimpleCronCloneHelper.java:95)
        at org.bonsaimind.bukkitplugins.SimpleCronCloneHelper.start(SimpleCronCloneHelper.java:62)
        at org.bonsaimind.bukkitplugins.SimpleCronClone.onEnable(SimpleCronClone.java:58)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:231)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1057)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:379)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:191)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:174)
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:444)
        at org.bukkit.Bukkit.reload(Bukkit.java:188)
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:22)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:386)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:777)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:737)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:725)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:178)
        at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:587)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:536)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  24. Offline

    Bobby_Bonsai

    Close, you're looking for:

    Code:
    # +----------------> Minute
    # | +--------------> Hour
    # | | +------------> Day of month
    # | | | +----------> Month
    # | | | | +--------> Day of week
    # | | | | |     +--> Script/File
    # | | | | |     | 
      5 0 * * 6 enable.scc
      5 0 * * 1 disable.scc
    
    The order was reversed.
     
  25. Offline

    efstajas

    Great, seems to work! Awesome, can think of so many things to use this. Thanks :)
     
  26. Offline

    admalledd

  27. Offline

    FloydATC

  28. Offline

    admalledd

    again with a update breaking something. this time I dont really know enough nor have enough time to do a "better" fix that would make this work with all future patches, so I will have to fix it every mc update. link to download: http://www.admalledd.com/dl/SimpleCronClone_1.4.6_test.jar source is in the .jar. basically added the "v1_4_6." where eclipse was complaining about missing classes...
     
  29. Offline

    admalledd

    version 0.7, with some fixes for other things than just making it run on servers again. fixed console execution blocks main thread and ConcurrentModificationExceptions due to threading. now uses bukkit's scheduler

    temp dl: here

    ok, me and Bobby_Bonsai have talked a bit and I am now working on taking over this plugin. Sadly most of my main life is busy at this moment, but before the month is out I plan on having a proper dev.bukkit.org page and all that jazz. my downloads from my server will be moved to dev.bukkit.org when that happens.
     

Share This Page