Bash script to run php script?

If you have PHP installed as a command line tool (try issuing php to the terminal and see if it works), your shebang (! ) line needs to look like this.

If you have PHP installed as a command line tool (try issuing php to the terminal and see if it works), your shebang (#! ) line needs to look like this: #! /usr/bin/php Put that at the top of your script, make it executable (chmod +x myscript.

Php), and make a Cron job to execute that script (same way you'd execute a bash script). You can also use php myscript.php.

I'm pretty sure something like this is what you are looking for: #! /bin/sh php /pathToScript/script. Php Save that with your desired script name (such as runPHP.Sh) and give it execution rights, then you can use it however you want.

Edit: You might as well not use a bash script at all and just add the "php ..." command to the crontab, if I'm not mistaken. Good luck!

You just need to set : /usr/bin/php path_to_your_php_file in your crontab.

If you don't do anything in your bash script than run the php one, you could simply run the php script from cron with a command like /usr/bin/php /path/to/your/file.php.

The bash script should be something like this: #! /bin/bash /usr/bin/php /path/to/php/file. Php You need the php executable (usually found in /usr/bin) and the path of the php script to be ran.

Now you only have to put this bash script on crontab and you're done!

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions