Batch job locations

i read about occ and batch utilities, where are they located in case one wants to run them manually.

trying to locate jobs ran by cron.php

I assume, they are in table oc_jobs in the DB.

so my next question is how do i manually execute them

AFAIK they are run by cron or invoked by an occ command.

But I think fiddling around with this jobs is a bad idea.

if you are using Cron, you can execute manually by using this command: sudo -u www-data /usr/bin/php -f /path/to/your/owncloud/cron.php.

yes , my concern how do i know which jobs i running .
when i run that command all i see is
“,“remoteAddr”:”",“user”:"–",“app”:“cron”,“method”:"–",“url”:"–",“message”:“Invalidating tokens older than 2018-09-09T08:00:02+00:00”}

want to know which jobs are running, i also expected files in trash bin to be removed

Hmmm, running this command doesn’t produce any log-entry here.

Log level is 1 for this activity

Agree. But this is only an information, not an error.

All I meant is perhaps you didn’t see it because of your log level config

Still want to know about what info that job produces

ok now i see them in the log

BackgroundJob\/ExpireTrash.php(85): OCA\\Files_Trashbin\\Trashbin::deleteExpiredFiles

There are some jobs that you can move into separate commands, and separate crontab entries, detailed here:

1 Like

So what would crontab entry look example for
occ trashbin:expire

For example:
0 * * * * sudo -u www-data /path/to/occ trashbin:expire >/dev/null 2>&1 to run it once per hour. Used:

1 Like

thanks, is this the occ file you referring to

#!/usr/bin/env php

<?php /** * Copyright (c) 2013 Thomas Müller * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ //$argv = $_SERVER['argv']; require_once __DIR__ . '/console.php';