Title: Php not working.
Last modified: June 2, 2018

---

# Php not working.

 *  [sangfroidweb](https://wordpress.org/support/users/sangfroidweb/)
 * (@sangfroidweb)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/php-not-working-7/)
 * I set up a php cron job that includes a different php file.. here’s all the php
   in the chronjob:
 * $filepath = $_SERVER[‘DOCUMENT_ROOT’] . “/hubspot-api/list_loader.php”;
    require
   $filepath;
 * The job says it runs.. but I can tell that it’s not because a text file that 
   gets written by the included file (list_loader.php) isn’t loading. To text the
   code, paths, etc, I created a php file in another random directory and added 
   only the code above (same thing I pasted into the “PHP Code” field of the cron
   event, and when I run that file, everything works fine. Do you have any idea 
   why this might not be working as a cron event in the WP Crontrol plugin?

The topic ‘Php not working.’ is closed to new replies.

 * ![](https://ps.w.org/wp-crontrol/assets/icon.svg?rev=2997335)
 * [WP Crontrol](https://wordpress.org/plugins/wp-crontrol/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-crontrol/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-crontrol/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-crontrol/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-crontrol/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-crontrol/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [sangfroidweb](https://wordpress.org/support/users/sangfroidweb/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/php-not-working-7/)
 * Status: not resolved