Jump to content

Renaming a task


Go to solution Solved by Ryan Ashbrook,

Recommended Posts

Posted (edited)

Clarifying what some tasks do, the desire to rename the task file / class is really needed. That said, when updating an existing installation of the application, the originally named task still exists in the applications task folder. It is also present when viewing all tasks, because it's sticking around in the core_tasks table. Running this query on upgrade appears to fail. Am I missing something? Double check the query syntax for me.

\IPS\Db::i()->delete( 'core_tasks', array ('key=? AND app=?','steamCleanup','steam') )

 

Edited by Aiwa
Posted

😞 it’s not in the tasks.json. Do I need to escape quotes so it treats the values as strings? I’ll have to try that as soon as I get back to my machine this evening. 

Posted

Ah, yes. I encountered that same issue recently on a client's site using my Moods application. Adding backticks solved it.

I didn't think of that because without backticks the query threw a specific error about having a wrong LIMIT value, and you didn't mention anything like that. 😅

Posted

Thanks @Ryan Ashbrook ! That did it. I completely glossed over the fact that it was a keyword. I write enough SQL queries at work I don't know how I missed that. That said, I use a SQL syntax editor that catches that for me when I forget. 'name' is probably another one someone is likely to hit. 😄 

@teraßyte, an error was being thrown, but it was the last 10ish characters of the query with a generic syntax error message.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...