1

Hi good day i was using cron job for task here is my cronjob script is like cronjob.php?cron=1 but that link not working iam getting email like cron cant abe to open input file why cron dont get id

Danial Afridi
  • 97
  • 1
  • 4
  • 2
    Hi, take some time to clearly describe your problem, and present us with your code, what you expect it to do, what it currently does and what you've tried to solve the issue - read [ask] – jibsteroos Sep 21 '19 at 20:07
  • Cron jobs are triggered from the command line, not via HTTP. That is not how you pass arguments via CLI. https://www.php.net/manual/en/function.getopt.php – Sammitch Sep 21 '19 at 22:04

1 Answers1

0

we have to pass the id in the constructor after that we can do some thing like this $id = $this->argument('id');

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 04 '22 at 13:06