ntakcron.class.php 976 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. require_once DOL_DOCUMENT_ROOT.'/custom/ntak/class/ntaksender.class.php';
  3. class NtakCron
  4. {
  5. public $output;
  6. public $error;
  7. public function run()
  8. {
  9. print 'run';exit;
  10. dol_syslog(__METHOD__, LOG_DEBUG);
  11. exit;
  12. $result = 0;
  13. $this->output = '';
  14. $this->error = '';
  15. $ntakSender = new NtakSender;
  16. if ($ntakSender->send()) {
  17. $this->output = 'NTAK sent successfully';
  18. $ntakSender->checkNtakStatus();
  19. } else {
  20. $result = 1;
  21. $this->error = 'NTAK failure';
  22. }
  23. return $result;
  24. }
  25. public function runbbus()
  26. {
  27. $result = 0;
  28. $ntakSender = new NtakSender;
  29. if ($ntakSender->send2()){
  30. $this->output = 'NTAK sent successfully';
  31. } else {
  32. $result = 1;
  33. $this->error = 'NTAK failure';
  34. }
  35. return $result;
  36. }
  37. public function runnilsz()
  38. {
  39. print 'nilsz';exit;
  40. }
  41. }