Mobile app version of vmapp.org
Login or Join
Candy875

: How do I run something from the command line on shared hosting? I have shared hosting and they haven't given me command line (or ssh or shell) access. Is there a way that I can run something

@Candy875

Posted in: #Cron #SharedHosting

I have shared hosting and they haven't given me command line (or ssh or shell) access. Is there a way that I can run something from the command line?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Candy875

2 Comments

Sorted by latest first Latest Oldest Best

 

@Looi9037786

cron is your best bet if you want to run something periodically.

If you just want to run a few shell commands (and depending on the security restrictions of your host) have a look at php's backtick operator and shell_exec function

I have had success with phpshell and phpsh projects too.

10% popularity Vote Up Vote Down


 

@Goswami781

Your shared hosting may give you access to cron jobs. (On cPanel hosting this may be under Advanced Tools.) Cron is a Unix command which runs a task at a specified time. You can create a cron job to run the task you want, if your shared hosting lets you.

cPanel gives this warning though:


You need to have knowledge of *nix commands before you can use cron
jobs effectively. Check your script with your hosting administrator
before adding a cron job.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme