use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
// Poll contacts with specific parameters
if (!empty($parameter)) {
self::pollContacts($parameter, $generation);
// Poll contacts with specific parameters
if (!empty($parameter)) {
self::pollContacts($parameter, $generation);
// run queue delivery process in the background
Worker::add(PRIORITY_NEGLIGIBLE, "Queue");
// run queue delivery process in the background
Worker::add(PRIORITY_NEGLIGIBLE, "Queue");
// once daily run birthday_updates and then expire in background
$d1 = Config::get('system', 'last_expire_day');
// once daily run birthday_updates and then expire in background
$d1 = Config::get('system', 'last_expire_day');
Worker::add(PRIORITY_LOW, "CronJobs", "update_photo_albums");
// Delete all done workerqueue entries
Worker::add(PRIORITY_LOW, "CronJobs", "update_photo_albums");
// Delete all done workerqueue entries
// check upstream version?
Worker::add(PRIORITY_LOW, 'CheckVersion');
// check upstream version?
Worker::add(PRIORITY_LOW, 'CheckVersion');
// Only poll from those with suitable relationships,
// and which have a polling address and ignore Diaspora since
// Only poll from those with suitable relationships,
// and which have a polling address and ignore Diaspora since
/*
* We should be getting everything via a hub. But just to be sure, let's check once a day.
* (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
/*
* We should be getting everything via a hub. But just to be sure, let's check once a day.
* (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + ".$min_poll_interval." minute")) {
+ if (DateTimeFormat::utcNow() > DateTimeFormat::utc($t . " + ".$min_poll_interval." minute")) {
- Worker::add(array('priority' => $priority, 'dont_fork' => true), 'OnePoll', (int)$contact['id']);
+ Worker::add(['priority' => $priority, 'dont_fork' => true], 'OnePoll', (int)$contact['id']);