Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7998451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:12:50+00:00 2026-06-04T15:12:50+00:00

I have 2 php scripts which need to run every few minutes, the php

  • 0

I have 2 php scripts which need to run every few minutes, the php itself is fine as I can trigger it manually by typing http://myfakesite.com/myphpfile.php into a browser. Both work as they should.

I don’t have much experience with cron but I have found the crontab file (I am using Parallels Power Panel on a VPN), and it already had jobs to run-parts cron.hourly, daily, weekly and monthly. I added my email address to the MAILTO field, and get a message telling me that cron.hourly is not a directory – even though it is (although it is currently empty).

I also added my own 2 jobs to this file as follows:

*/1 * * * * wget http://myfakesite.com/script1.php
*/5 * * * * wget http://myfakesite.com/script2.php

Neither of these ever get called. In the php script I also have a line to email me once the script is called, so that I know it is working, and have never received an email via the cronjob. If I ssh into the server and use wget the php works and emails me to confirm.

I have also tried

*/1 * * * * php http://myfakesite.com/script1.php

and

*/1 * * * * wget -O /dev/null http://myfakesite.com/script1.php>/dev/null 2>&1

with no luck. The MAILTO in the crontab file never sends me a message to say there was a problem running the script, but clearly it is not doing it.

Can anyone help at all? I have no idea what to try next.

Edit: Found some info that said that the ‘not a directory’ error can be down to a corrupt crontab file. So I downloaded it copied the info to a new file and uploaded that. The ‘not a directory’ error disappeared…COMPLETELY. Even if I tell it to look for a folder which I know doesn’t exist like cron.myfakefolder I don’t get a Not a directory: /etc/cron.myfakefolder email. Replaced my new crontab file with the original, and I’m still not getting any feedback from the cronjob.

Edit 2: As dAm2K and prodigitalson suggested, I tried using the absolute paths to both wget and php. Neither have worked, and I’ve double checked the locations of usr/bin/wget and usr/bin/php just to make sure they were actually there.
I also checked var/log/cron and var/log/messages, both contained this:

2002Can’t perform “download” operation: Requested file “/var/log/cron” is to big to be sent at once. Try to request file in pieces of 512KB

No idea what is happening with this. As I mentioned in edit 1, I’m also no longer receiving error emails even when I purposely add a false location. Is this related to the error in the log files?

Also, I have checked that crond is running and according to both ‘System Services’ and ‘System Processes’ it is running.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T15:12:50+00:00Added an answer on June 4, 2026 at 3:12 pm

    Try using absolute paths to executables with cron: eg

    */5 * * * * /usr/bin/wget 'http://myfakesite.com/script1.php'
    

    instead of

    */5 * * * * wget http://myfakesite.com/script1.php
    

    Double check /var/log/messages or /var/log/syslog log files for details on cron execution, and what happens to the system in general.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two php scripts that need to be run as continuous back ground
I have a PHP-script originally developed on Ubuntu, which now has to run on
I have a zendframework project for which i need to run a script periodically
I have a node.js script which need to start at boot and run under
I am running a cron job every five minutes which calls a php script
I have this PHP script which i'm grabbing images from a directory and displaying
I have a php script which saves the original image, then resizes it -
I have a PHP script which creates and listens on a port for connections
I have a PHP script which is generating buttons to each content schedule. The
I have a PHP search script which I've altered slightly and works well for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.