CrontabManagerInterface.php 979 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Crontab;
  7. use Magento\Framework\Exception\LocalizedException;
  8. /**
  9. * Interface \Magento\Framework\Crontab\CrontabManagerInterface
  10. *
  11. */
  12. interface CrontabManagerInterface
  13. {
  14. /**#@+
  15. * Constants for wrapping Magento section in crontab
  16. */
  17. const TASKS_BLOCK_START = '#~ MAGENTO START';
  18. const TASKS_BLOCK_END = '#~ MAGENTO END';
  19. /**#@-*/
  20. /**
  21. * Get list of Magento Tasks
  22. *
  23. * @return array
  24. * @throws LocalizedException
  25. */
  26. public function getTasks();
  27. /**
  28. * Save Magento Tasks to crontab
  29. *
  30. * @param array $tasks
  31. * @return void
  32. * @throws LocalizedException
  33. */
  34. public function saveTasks(array $tasks);
  35. /**
  36. * Remove Magento Tasks form crontab
  37. *
  38. * @return void
  39. * @throws LocalizedException
  40. */
  41. public function removeTasks();
  42. }