News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to delete a cron job from task manager?

Started by Arskrigitsioniets, November 19, 2023, 03:47:27 PM

Previous topic - Next topic

Arskrigitsioniets

I deleted a plugin but its job in task manager still here. How can I delete it?

Sir Osis of Liver

Not sure what you're asking.  Cron jobs are server side.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

I think the OP means the "scheduled tasks"

-- it depends how that task was added.   If it was added by a hook, then simple (in 2.1.x) -- go to forum maintenance > Integration Hooks 
you can disable and remove hooks from there....

If it was added by code edit -- then you need to find whatever edit the mod made an manually change it back/remove it
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arskrigitsioniets

Quote from: Kindred on November 20, 2023, 08:59:44 AMI think the OP means the "scheduled tasks"

-- it depends how that task was added.   If it was added by a hook, then simple (in 2.1.x) -- go to forum maintenance > Integration Hooks 
you can disable and remove hooks from there....

If it was added by code edit -- then you need to find whatever edit the mod made an manually change it back/remove it
It was added through code creating table in DB. So I deleted that table in scheduled_tasks DB table. Idk, is it enough?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Doug Heffernan

Quote from: Arskrigitsioniets on November 20, 2023, 11:17:34 AMIt was added through code creating table in DB. So I deleted that table in scheduled_tasks DB table. Idk, is it enough?

I am a bit confused, you are saying that the mod had added a new table in the database and you deleted that table from the scheduled_tasks table, but you can't have a table within a table in the database. Did you mean a field/row instead?

What is the mod in question?

Arskrigitsioniets

Quote from: Doug Heffernan on November 21, 2023, 06:41:25 AM
Quote from: Arskrigitsioniets on November 20, 2023, 11:17:34 AMIt was added through code creating table in DB. So I deleted that table in scheduled_tasks DB table. Idk, is it enough?

I am a bit confused, you are saying that the mod had added a new table in the database and you deleted that table from the scheduled_tasks table, but you can't have a table within a table in the database. Did you mean a field/row instead?

What is the mod in question?
It's RSS Feed Poster.

It adds the following to DB that creates a scheduled task:
// Add the scheduled task
$dbresult = $smcFunc['db_query']('', "
SELECT
COUNT(*) as total
FROM {db_prefix}scheduled_tasks
WHERE task = 'update_feedbots'");
$row = $smcFunc['db_fetch_assoc']($dbresult);
if ($row['total'] == 0)
{
$smcFunc['db_query']('', "INSERT INTO {db_prefix}scheduled_tasks
   (time_offset, time_regularity, time_unit, disabled, task)
VALUES ('0', '2', 'm', '0', 'update_feedbots')");
}

I deleted this: update_feedbots from scheduled_tasks table. I think it's called a row after all, I mixed up things a bit, just I'm not an expert in MySQL parameters.

Sir Osis of Liver

It's a column, deleting it should fix the problem if mod uninstalled without errors.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

No, sir Osis.. that's a row
A column would be an additionsl field added to every row in the table
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Isn't that what it is?  Will have to look at the table when back on computer.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

The query above adds a row to the table and fills in the values for each column.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Yep, I see it now.  Misread the query, each row is a task.  In any event, deleting the row should fix the problem.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: