Scheduled tasks not running.
-
Running version 5612.
When sheduling any task (deploy, capture, wake-up, doesn’t matter what), the task does not start up the machine(s). Without the scheduler, all these tasks work fine. I found a fix that suggests making the mysql root password blank but that didn’t help.
The task scheduler worked fine in the past. It’s hard to tell when it stopped working because it went unused for some time. I can also use the Wake On Lan tool on my Windows machine to remotely wake up any machine so NIC settings are configured properly.Any suggestions?
Thanks for your time.
-
I don’t understand what you’re saying.
Scheduled tasks shouldn’t start the systems that are being tasked until the tasking time is met. Is this what’s not working?
-
@JeffD 99% of the time, scheduled tasks that don’t run are because your server time is off.
Fix the time on your server, and set your timezone properly both on the server and in the FOG Web Interface.
-
@Tom-Elliott said:
I don’t understand what you’re saying.
Scheduled tasks shouldn’t start the systems that are being tasked until the tasking time is met. Is this what’s not working?
That’s exactly what’s not working.
@Wayne-Workman said:
@JeffD 99% of the time, scheduled tasks that don’t run are because your server time is off.
Fix the time on your server, and set your timezone properly both on the server and in the FOG Web Interface.
I’ve edited /etc/php5/apache2/php.ini to include the correct timezone.
I’ve also changed FOG_TZ_INFO in the fog settings to the correct timezone.If I schedule a task for 5 minutes into the future, the scheduled tasks page says that it’ll run in 5 minutes, if I keep refreshing it’ll eventually say it’ll run “seconds from now” and if I refresh for another minute it’ll show it ran “moments ago”. So the time showing on the webpage seems right. So it seems like it’s trying to run it at the time I scheduled it, but then doesn’t start up the machines to carry out the task.
After making this thread I installed a fresh server completely from scratch (version 5612) and it doesn’t work on that either.
Oh by the way I’m using Ubuntu Server 14.04.3 if it matters.
-
@JeffD So what happens if you log into your FOG server via SSH and issue the
date
command?It should return with the day, month, year, and time… How accurate is it?
-
It would be interesting to know what if anything is posted to the /opt/fog/log/taskscheduler.log when one of these scheduled events are missed. If its not in there, one might think one of the logs would say what just happened. This is very strange that “nothing” happens.
You might want to check to see if the fog task scheduler service is running. I might be able to understand if the scheduler is not running. The web gui looks at the database where the scheduled task is run. It calculates when it should run and displays that to the user. So the time line is correct from the users perspective. Its just the task never kicks off on the back end. This is all speculation, but it sounds logical.
-
I’'m now testing this on a 1.2.0 FOG server also on Ubuntu Server 14.04.3. Same problem.
@Wayne-Workman said:
@JeffD So what happens if you log into your FOG server via SSH and issue the
date
command?It should return with the day, month, year, and time… How accurate is it?
Seems accurate down to the second, timezone and all.
@george1421 said:
It would be interesting to know what if anything is posted to the /opt/fog/log/taskscheduler.log when one of these scheduled events are missed. If its not in there, one might think one of the logs would say what just happened. This is very strange that “nothing” happens.
You might want to check to see if the fog task scheduler service is running. I might be able to understand if the scheduler is not running. The web gui looks at the database where the scheduled task is run. It calculates when it should run and displays that to the user. So the time line is correct from the users perspective. Its just the task never kicks off on the back end. This is all speculation, but it sounds logical.
I did not find /opt/fog/log/taskscheduler.log but I did find fogscheduler.log there. I assume this is the same thing? These are the last 10 entries.
[12-10-15 7:51:30 am] * 0 active task(s) awaiting check-in. [12-10-15 7:51:30 am] * No tasks found! [12-10-15 7:52:30 am] * 0 active task(s) awaiting check-in. [12-10-15 7:52:30 am] * 1 task(s) found. [12-10-15 7:52:30 am] * Task run time: Thu, 10 Dec 2015 08:51:00 +0000 [12-10-15 7:52:30 am] * Task doesn't run now. [12-10-15 7:53:30 am] * 0 active task(s) awaiting check-in. [12-10-15 7:53:30 am] * No tasks found! [12-10-15 7:54:30 am] * 0 active task(s) awaiting check-in. [12-10-15 7:54:30 am] * No tasks found!
The strange thing is I scheduled a task for 9:24am, and I looked this up at around 9:25 am. The log shows 7:52 am and there definitely weren’t any tasks planned at that time.
-
@JeffD it appears your sever time is off a bit then. The first thing I notice the left time which you saw as well. It is displaying 7:52 but your time is 9:25? The task run is showing as 8:52 correct? What is the output of the command
date
on your server and the time the scheduler is putting for the text? They should be identical. -
Okay, it’s fixed but I’m still scratching my head about it.
I was having an additional issue where occasionally upon rebooting the server, MySql died and I had to manually restart it.
I fixed it by following these instructions (The part under “Ubuntu 13.04 14.04 15.04 and higher with FOG 1.2.0”).
I really can’t see how that fixed it but it’s somehow working now…So consider the problem solved. Thank you for your time.