You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ijob.php 981B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace OCP\BackgroundJob;
  9. interface IJob {
  10. /**
  11. * Run the background job with the registered argument
  12. *
  13. * @param \OCP\BackgroundJob\IJobList $jobList The job list that manages the state of this job
  14. * @param \OC\Log $logger
  15. * @return void
  16. */
  17. public function execute($jobList, $logger = null);
  18. /**
  19. * Get the id of the background job
  20. * This id is determined by the job list when a job is added to the list
  21. *
  22. * @return int
  23. */
  24. public function getId();
  25. /**
  26. * Get the last time this job was run as unix timestamp
  27. *
  28. * @return int
  29. */
  30. public function getLastRun();
  31. /**
  32. * Get the argument associated with the background job
  33. * This is the argument that will be passed to the background job
  34. *
  35. * @return mixed
  36. */
  37. public function getArgument();
  38. }