Ran “update oc_jobs set last_run=0” to database

Ran “update oc_jobs set last_run=0” to database

This is a step in another post which sadly is already closed:

How exactly do I “run to database” can someone explain a step by step solution how to do this?

if I run “update oc_jobs set last_run=0” in the main linux shell I just get an answer the command is unknown, clearly I need to do “to database” whatever that means.

Thank you for your help

I’m a little new to to this too and I recently moved from nextcloud snap to AIO but per the nextcloud snap github I believe you just need to type

sudo nextcloud.mysql-client

this should open a new MySQL/MariaDB prompt. You may then need to select the nextcloud database which I believe should just be “nextcloud” by default, so type:

USE nextcloud;

You should receive a message saying Database changed if successful. Now you should be able to run the update query:

UPDATE oc_jobs SET last_run = 0;

If you like, you can run a query to select the last_run column from the oc_jobs table:

SELECT job_id, class, last_run FROM oc_jobs;

This will display a list of jobs with their job_id, class (which specifies the task the job is responsible for), and last_run. The last_run column should now show a 0 for all jobs if your previous UPDATE command was successful. And then to exit type

EXIT;

1 Like

one little sidenote to this answer.

it’s not “job_id” but simply “id” for the SELECT command

Anyway, dear Dilute, thank you SOOOOO MUCH!! You’re a life-saver hehe

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.