title: PHP Cron Job on 1and1.com Dedicated Server
body: <p>I have a dedicated server at 1and1.com using Parallels Plex Panel which I set up with standard settings.  I am trying to get the following file to run once a day:</p>
  
  <p><code>httpdocs/www/routine.php</code>  (where httpdocs is the root of my website)</p>
  
  <p>When I input this path in the Command field in their Scheduled Tasks panel, I get a "Permission denied" error.  This is not a protected directory and the file runs perfectly from the web.  </p>
  
  <p>I have tried many other variations of the command based on things I have found online and info I have found when running <code>phpinfo()</code>.  None of the following have worked (see below).</p>
  
  <p>Has anyone here had similar issues at 1and1?  What do I need to input into the command field to make this run?  Is there a standard formula based on the phpinfo results?  1and1 is refusing to help.</p>
  
  <p>From PHPINFO():</p>
  
  <p>Note below that I have replaced my domain with "example.com" and my username by "unsername".  The "default-domain.com" element is something unique to 1and1.com's hosting.</p>
  
  <pre><code>_SERVER["HTTP_HOST"]
  www.example.com
  
  PP_CUSTOM_PHP_INI: 
  /var/www/vhosts/example.com/etc/php.ini 
  
  DOCUMENT_ROOT 
  /var/www/vhosts/default-domain.com/httpdocs/www 
  
  SCRIPT_FILENAME 
  /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  </code></pre>
  
  <p>Previously tried:</p>
  
  <pre><code>/var/www/vhosts/default-domain.com/httpdocs/www/routine.php  
  
  /var/www/vhosts/example.com/etc/ /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  
  /var/www/vhosts/example.com/etc/php /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  
  /var/www/vhosts/example.com/etc/php.ini /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  
  /etc/ /var/www/vhosts/default-domain.com/httpdocs/www/routine.php
  
  /usr/lib/php /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  
  /bin/ /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  
  /bin/php /var/www/vhosts/default-domain.com/httpdocs/www/routine.php
  
  /bin/php /var/www/vhosts/default-domain.com/httpdocs/www/routine.php
  
  /bin/php /var/www/vhosts/default-domain.com/httpdocs/www/routine.php
  
  /sbin/ /var/www/vhosts/default-domain.com/httpdocs/www/routine.php
  
  /sbin/php /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  
  /usr/sbin/ /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  
  /usr/sbin/php /var/www/vhosts/default-domain.com/httpdocs/www/routine.php
  
  /usr/bin/ /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  
  /usr/bin/php /var/www/vhosts/default-domain.com/httpdocs/www/routine.php
  
  /sbin:/usr/sbin:/bin:/usr/bin /var/www/vhosts/default-domain.com/httpdocs/www/routine.php 
  
  php -q /username/example/httpdocs/www/routine.php
  
  php -q /username/example.com/httpdocs/www/routine.php
  
  php -q /example/httpdocs/www/routine.php
  
  php -q /example.com/httpdocs/www/routine.php
  
  php -q /username/httpdocs/www/routine.php
  
  php -q /httpdocs/www/routine.php
  
  php -q /www/routine.php
  
  php -q /routine.php
  
  php /username/example/httpdocs/www/routine.php
  
  php /username/example.com/httpdocs/www/routine.php
  
  php /username/www.example.com/httpdocs/www/routine.php
  
  php /example/httpdocs/www/routine.php
  
  php /example.com/httpdocs/www/routine.php
  
  php /www.example.com/httpdocs/www/routine.php
  
  php /username/httpdocs/www/routine.php
  
  php /httpdocs/www/routine.php
  
  php /www/routine.php
  </code></pre>