SOLVED WOL only works immediately never as planned or cron task

  • Hi,

    today i made a testrange with some tasks (fog 0.32, ubuntu 12.04):
    []The machines always wake up if they where properly shutdown by the os and i try to send a wake up over advanced tasks.
    ]The machines always wake up if i trigger to make an image immediately
    []The machines never wake up if i schedule the image task
    ]The machines never wake up if i use cron jobs (also the cron job is not created crontab always empty) i’ve checked the crontab for all existing users! crontab -u user -l…
    Is there anyone out there who has imaging working with scheduled or cron tab tasks?
    Howto debug why this is not working, it’s a pain i left all problems behind but this damn wol thing isn’t working.

    And it’s not a switch problem, or a not properly shutdowned machine! Like i said immediately tasks always wake up machines properly but only then!

    Please help or assist to debug

    Greetz X23

  • You can download from SVN with:
    [code]svn co fog_0.33b[/code] then cd to the fog_0.33b folder and perform normal install or you can download a pre-made tarball at latest revision with:

    Extract the tarball with:
    [code]tar -xjf fog_0.33b.tar.bz2[/code]

    Then cd into the fog_0.33b folder and perform normal install from there.

  • How do I get 0.33?

  • Yep, Not quite a million updates, but a lot of frustrating testing.

    Again, I don’t have any thing real to test with, but I can watch the tasks being activated, and verify they’re now activating when they’re expected to. Hopefully this is what’s needed. For the Task Run Time in the log viewer, I have the dates working to display the rfc time based on the timestamp for delayed jobs, and for cron jobs, it just displays the cron as is present on the database. It appears, so far, all is working properly now.

  • Developer

    Told ya he’d get it 😉

  • I think I actually got it through more rigorous checking with my test system. It actually looks to create the task as active in wait for the job to start.

  • I’m about to release another revision due to Scheduled tasks. Again it’s only for 0.33, but it seems to, finally, be working properly. *'s work just like crontab. There’s a couple other issues in scheduling the task that’s a little off, but that’s validation problems and not scheduling problems.

    I’ve only tested using false values for everything and watching log files. Real-world I haven’t a clue, but at least I can say with some assurance it appears to be working as expected. I haven’t figure out the Single Scheduled task entry process yet and haven’t tested it because of this reason. So to be blatant, only cron style tasks seem to be working for now.

    Hopefully this helps.

  • I am adding the caveat to this, as reading a little further, you’re stating that this bug was with 0.32 and I have been updating 0.33. I still don’t know if the jobs are working properly, but can see what’s going on in 0.32. Maybe I’ll have another aha moment when looking into this for you all.

    I’m not familiar with scheduled tasks too much beyond crontab specified, so if my results aren’t working fully yet, I’m very sorry.

  • r947 was out, please don’t try was testing something and forgot to remove those tests.

    r948 is out and should have scheduled tasks back though I don’t really know for sure. Please test.

  • I’ve since, I think, fixed this issue and will post the updates. I’ve also added the tools to start viewing the scheduled jobs as nothing was in place for this. When I have time tomorrow, I’ll try to upload my changes. Hope all is well. First file that needed changing is the one I already uploaded once. It didn’t work through my testing, but I narrowed how to get it sort of working, I think. Again, I have nothing much I can truly test on, but at least I can see the jobs trying to run.

  • r946 should now have scheduled tasks back. Hopefully this helps, but please test. I don’t know what Imageable.interface.php was supposed to have so I haven’t a clue as to where to begin coding this if it was truly ever needed in the first place.

  • I think I found the problem.

    The file in /opt/fog/service/FOGTaskScheduler/ is referencing the class files Host.class.php, Task.class.php, etc… as WEB_ROOT . /management/lib/<classfilename> Which is why it’s not finding anything. One of the files, Imageable.interface.php, doesn’t exist and never has, though the file is still referencing it. I may have just found a fix, but will test with a simple inserted job to see that it recognizes and attempts to run the job. Man, maybe this is much easier than I thought it would be.

  • I don’t know about that, but I might add a crontab for the root user that basically runs the php file every minute. This way the DB gets checked, assuming this worked at some point in time. That’s my guess at least.

  • Developer

    [quote=“Tom Elliott, post: 17959, member: 7271”]From what I could tell looking into this, it’s not using crontab or at to create scheduled jobs, but rather using the scheduletask service to check the database for specifics. I’ll try to look into it this weekend, but no gaurantees.[/quote]

    Aka there will probably be a million updates this weekend and this may be one of them 🙂

  • From what I could tell looking into this, it’s not using crontab or at to create scheduled jobs, but rather using the scheduletask service to check the database for specifics. I’ll try to look into it this weekend, but no gaurantees.

  • Thanks Tom. Hopefully you are able to find something amiss. If I run ‘lastlog’ I can see that I don’t have an Apache user. If a fix isn’t immediately apparent, I think being able to manually create the cron job with an authoritative user would be an acceptable workaround.

  • I will look into this when I get home though I make no promises as I have to figure out how its trying to create the tasks. It might be limited as the user it has to create the task is apache.

  • Registered for the sole reason of adding another voice to this bug. Just set up a FOG server, WOL works great when I trigger it manually or tell it to make an image manually. Try to set up a cron schedule for it and it doesn’t work. check cron for fog user and there’s nothing. check it for root and my user, also nothing. This would be killer if the scheduling worked. Hopefully this will gain some visibility with devs.

    Thanks for an otherwise really sweet product.

  • X23 I am having the same problem with some newer hardware, Dell Optiplex 9010’s. I have my computer labs all torn apart over the summer, so I haven’t been able to try it on my older Dells. I will not be able to try anything until August sometime. I am using fog 0.32, running on a Ubuntu 12.04.2 machine.
    The guy who did my job before I got here had issues with WOL so he stuck with version 0.29, and Ubuntu 10.04.

  • X32
    Scheduled and cron WOL jobs works on our network. We are still using FOG 0.29

    If your planning on moving to Windows 8 see [url][/url]
    WOL from (S4) Hybrid shutdown or (S5) classic shutdown is unsupported in Windows 8