Jump to content

gtvitini

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by gtvitini

  1. OK, thanks for the input. It finally worked but with a small update in your code (replacement of option '-p' with option '-q'): php -q /home1/<myaccountname>/public_html/<myphpfile>.php p.s: how can I mark this topic as [sOLVED]?
  2. Hello, I am trying to execute a .php file using cronjobs but it seems I am experiencing some trouble with the syntax I use. I have set up in cpanel a cronjob with the following command to be executed: /home1/<myaccountname>/public_html/<myphpfile>.php And I have created the following simple .php file (see the code below): #!/usr/local/bin/php <?php echo date("F j, Y, g:i a"); ?> The problem is that I cannot get to execute it, as I receive the following error: /bin/sh: /home1/<myaccountname>/public_html/<myphpfile>.php: /usr/local/bin/php: bad interpreter: No such file or directory I would go on and try a couple of different options but I run out of permitted cronjob executions. Could you please help me set up properly the cronjob?? Thnks.
×
×
  • Create New...