Scheduled tasks - repeatable



  • I just created a WOL task using the CRON style and I put all asterisks in all the fields through a group.

    Then I shutdown a lab and they did not WOL… because I assume the task for them all had completed before they even shutdown.

    Is this how it works now?

    Can it be changed so that tasks are repeatable?

    I’m looking for a way to wake up clients every day at set times using scheduled tasks - tasks that are repeatable.



  • These tasks are now showing up. @Developers

    0_1453386801773_upload-69e4d0e8-31e0-4ff5-a2a5-a2ac047b970e



  • @Wayne-Workman said:

    http://<fog up>/fog/management/index.php?sub=wakeEmUp&mac=<Mac of host>

    wiki

    That’s the web command for WOL.

    Added here: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_Web_Interface



  • I just updated to svn 4637 cloud 5937, still on Fedora 23 fully updated.

    These CRON WOL tasks for groups are still not showing up in the web interface.

    These errors are repeating in the apache error log, not sure if they are related.

    [Wed Jan 13 13:34:40.945093 2016] [:error] [pid 62521] [client 10.2.3.19:55782] PHP Warning: mysqli::select_db(): invalid object or resource mysqli\n in /var/www/html/fog/lib/db/mysql.class.php on line 40
    [Wed Jan 13 13:34:40.945118 2016] [:error] [pid 62521] [client 10.2.3.19:55782] PHP Warning: mysqli::query(): invalid object or resource mysqli\n in /var/www/html/fog/lib/db/mysql.class.php on line 52
    [Wed Jan 13 13:34:40.946053 2016] [:error] [pid 62521] [client 10.2.3.19:55782] PHP Warning: mysqli::select_db(): invalid object or resource mysqli\n in /var/www/html/fog/lib/db/mysql.class.php on line 40
    



  • Senior Developer

    @Wayne-Workman I want to figure out why you’re not seeing the tasks but things from the cron scheduler are working as intended now? Is it somewhat safe to solve this thread?



  • Ok I deleted everything in the scheduledTasks table - that stopped the constant WOL stuff.

    the FOGScheduler seems to be working correctly…
    0_1450378395432_upload-b38f35d8-6102-462b-85a7-1fe8520e666d

    However these cron tasks are still not showing in Task Management -> Scheduled Tasks, which means it’s not easy to delete cron tasks.

    For the moment - this is no longer a critical issue for me - I have a firm grasp on working with MySQL and knowing now about the scheduledTasks table - I can work with this.

    Things are workable. :-)



  • I’ve deleted everything in the tasks table… computers are still turning on/staying on.



  • @Tom-Elliott Ok… Progress… but not totally right.

    I haven’t even created any Cron tasks… but since I’ve updated, computers won’t stay shut down lol.

    I wonder if my previous attempts to create a * * * * * WOL task was stored but didn’t work. and if that’s the case - the previously created Cron task is not showing in the scheduled tasks list.

    Where are Cron jobs stored?

    Also - Cron style WOL through groups now tells me it successfully created the task - but the tasks are still not showing in the scheduled tasks area.


  • Senior Developer

    Should all be fixed in latest.

    Sorry about the havoc or issues this may have created.





  • 0_1450371107094_upload-f5296eca-619e-4124-9bb3-33ce38581d8f

    0_1450371114536_upload-915b02b8-88da-471b-86d4-72369c33146a



  • WOL as an immediate task through groups (even with an image unassigned) does work.

    WOL as an immediate task for one host does work.

    WOL as a cron task for one host does not work (Does create the task).

    WOL as a cron task through groups does not work (doesn’t create the tasks).

    This is what I’m doing in the groups for testing (about 30 in the group):

    0_1450368373842_upload-411c46ab-8b5d-480a-81ff-eb327380def4



  • I’m on cloud 5760 and the WOL Cron style tasks are now creating for individual hosts that don’t have images assigned. I can see them in task management under scheduled tasks - but it’s not actually running.

    And tasks are still not being created through groups.


  • Developer

    Moving to bug reports and marking it solved.


  • Senior Developer

    The issue was indeed due to non-image required tasks requiring an image set to the host. I have added checks now to hopefully ensure it no longer needs this if the image type is not of a nature that requires an image assigned.

    Thank you for reporting.


  • Senior Developer

    The suspected issue right now appears to be the wol tasking is requiring an image to be performed which should not be the case. Thanks @Wayne-Workman for pointing this out. Just thought I’d inform anyone else seeing the same type of problem.



  • http://<fog up>/fog/management/index.php?sub=wakeEmUp&mac=<Mac of host>

    wiki

    That’s the web command for WOL.



  • I tried to do it to just one individual host and got this:

    Wonder if the computers not having an image assigned prevented the cron-style WOL task from ever being created?

    0_1450300522409_upload-876c2ffe-6f3b-4a0e-82da-9d4cc3cbdf57



  • @Tom-Elliott

    [root@mbfog log]# systemctl restart FOGScheduler
    [root@mbfog log]# systemctl status FOGScheduler
    ● FOGScheduler.service - FOGScheduler
       Loaded: loaded (/usr/lib/systemd/system/FOGScheduler.service; enabled; vendor preset: disabled)
       Active: active (running) since Wed 2015-12-16 15:12:03 CST; 4s ago
     Main PID: 35455 (FOGTaskSchedule)
       CGroup: /system.slice/FOGScheduler.service
               ├─35455 /usr/bin/php -q /opt/fog/service/FOGTaskScheduler/FOGTaskScheduler &
               └─35458 /usr/bin/php -q /opt/fog/service/FOGTaskScheduler/FOGTaskScheduler &
    
    Dec 16 15:12:03 mbfog.mb.OMITTED.k12.mo.us systemd[1]: Started FOGScheduler.
    Dec 16 15:12:03 mbfog.mb.OMITTED.k12.mo.us systemd[1]: Starting FOGScheduler...
    [root@mbfog log]# tail fogscheduler.log
      #     GNU GPL Version 3                   #
      ###########################################
    
    [12-16-15 3:12:03 pm] Interface Ready with IP Address: 10.2.1.11
    [12-16-15 3:12:03 pm] Interface Ready with IP Address: mbfog.mb
    [12-16-15 3:12:03 pm]  * Starting TaskScheduler Service
    [12-16-15 3:12:03 pm]  * Checking for new items every 60 seconds
    [12-16-15 3:12:03 pm]  * Starting service loop
    [12-16-15 3:12:03 pm]  * 0 active task(s) awaiting check-in.
    [12-16-15 3:12:03 pm]  * No tasks found!
    [root@mbfog log]#
    
    

 

367
Online

41.9k
Users

12.4k
Topics

116.8k
Posts