Cron style task not showing up in active tasks
-
I had a thread about this on the old sourceforge forums I think (never resolved). After I setup a a cron style WOL task for a group of pcs the task never showed up in active tasks.
Someone told me that it would only show up while it was running.
My question is, say I want to modify said task. How can that be done?
-
Hi, the issue with tasks is well documented, you can access your tasks if you add PHPMyAdmin to your web server then open the fog database and edit the ‘[SIZE=14px][FONT=Verdan][COLOR=#008000]scheduledTasks’ [/COLOR][/FONT][/SIZE] table. Be careful when installing phpmyadmin as it needs a password for root access setting one will break fog, until you edit the relevant files again this is also documented.
Sorry to be vague.
-
I was going to suggest just editing the mysql table manually, but wasn’t sure if fog was doing something in addition at the time the task was created. Makes me wonder why there is no “edit” option.
How comfortable are you with mysql? It is really straight-forward to alter and edit a table. Give me an example of the task and how you want it modified and I’ll give you the commands.
astrouga
-
Going to do some research.
I see in another thread blackout said it is a planned fix for 0.33, I can just wait until then…I don’t want to try to fix something and end up breaking my server
-
No sweat. I was talking about manually editing the table without installing PHPMyAdmin.
Cheers,
astrouga
-
How is that done in ubuntu?
Just curious.
-
OK, you won’t get into any trouble with this. You can’t break anything or delete anything with these commands:
[CODE]Just open a terminal window on the server, then login via:
mysql -u root -p
(put in the mysql password that you supplied when you installed fog)at the mysql propt:
use fog;
select * from scheduledTasks;If you want to see just the column headers:
describe scheduledTasks;If you want to see the other tables:
show tables;
[/CODE]
You can’t get into any trouble with those commands…you are just viewing. However, if you want to delete or change the times on a task, you could do something like this:[CODE]Assume you list out your tasks and see a task that you want to change the starting hour to 11 am. It is listed in the scheduledTasks table with the stID of 3. (stID is the primary key and is auto-incremented in this table, so it is unique).
To update the hour (stHour in this table):
update scheduledTasks set stHour=11 where stID=3;
To verify that it was updated:
select * from scheduledTasks where stID=3;For some reason you decide you just want to delete the whole task:
delete from scheduledTasks where stID=3;
To verify that it is gone:
select * from scheduledTasks where stID=3;
[/CODE]Hope that helps.
astrouga
-
How can I make said commands fit the current terminal window? They’re going off the screen and looking disoriented because there are so many columns. Sorry it’s been a while since I’ve used mysql…
-
Oh, you could just replace the “;” with “\G”.
I’m not sure if there is another way. You could probably muck around with your terminal font size too.
astrouga
-
Thanks.
Is the stGroupHostID related to which group the task is being run on?
I notice that two are set to stGroupHostID: 12 which is my All PCs group.
But one is 35 (I think because it is not linked to a group?)
-
The stGroupHostID is the hostID, I believe. Look for hostID=12 in the hosts table:
select * from hosts where hostID=12;
See if that host is listed twice in the active tasks on the webpage. You should be able to look up the hostIDs in the hosts table and figure out which ones have “scheduledTasks”.astruga