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.
-
Wol will work as you described or at least should. Does the scheduler log show anything?
-
@Tom-Elliott There wasn’t anything in the log viewer… I’m guessing that’s not good.
But on the server, there is this:
[root@mbfog ~]# cd /opt/fog/log [root@mbfog log]# ls fogreplicator.log multicast.log multicast.log.udpcast.21 multicast.log.udpcast.26 multicast.log.udpcast.32 pinghosts.log fogscheduler.log multicast.log.udpcast.16 multicast.log.udpcast.22 multicast.log.udpcast.29 multicast.log.udpcast.33 servicemaster.log fogsnapinrep.log multicast.log.udpcast.19 multicast.log.udpcast.23 multicast.log.udpcast.30 multicast.log.udpcast.34 groupmanager.log multicast.log.udpcast.20 multicast.log.udpcast.25 multicast.log.udpcast.31 multicast.log.udpcast.35 [root@mbfog log]# tail fogscheduler.log [12-16-15 3:05:55 pm] Interface Ready with IP Address: mbfog.mb [12-16-15 3:05:55 pm] * Starting TaskScheduler Service [12-16-15 3:05:55 pm] * Checking for new items every 60 seconds [12-16-15 3:05:55 pm] * Starting service loop [12-16-15 3:05:55 pm] * 0 active task(s) awaiting check-in. [12-16-15 3:05:55 pm] * No tasks found! [12-16-15 3:06:55 pm] * 0 active task(s) awaiting check-in. [12-16-15 3:06:55 pm] * No tasks found! [12-16-15 3:07:55 pm] * 0 active task(s) awaiting check-in. [12-16-15 3:07:55 pm] * No tasks found! [root@mbfog log]#
-
Can you try restarting the FOGScheduler service?
-
[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]#
-
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?
-
http://<fog up>/fog/management/index.php?sub=wakeEmUp&mac=<Mac of host>
wiki
That’s the web command for WOL.
-
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.
-
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.
-
Moving to bug reports and marking it solved.
-
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.
-
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):
-
-
-
Should all be fixed in latest.
Sorry about the havoc or issues this may have created.
-
@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.
-
I’ve deleted everything in the tasks table… computers are still turning on/staying on.
-
Ok I deleted everything in the scheduledTasks table - that stopped the constant WOL stuff.
the FOGScheduler seems to be working correctly…
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.
-
@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?
-
@Tom-Elliott Yes.