My cron job is not working

I recently created a hosting, uploaded my files, created a database and checked that everything works properly, but when tryed to set a cron job, it doesn’t execute my script.

My script is executed perfectly when visiting https://huerto.000webhostapp.com/alerta.php. It sends me a mail like I want, and it’s into public_html folder.

The code is:

<?php $para = 'pepon2391@gmail.com'; $titulo = 'Prueba cron'; $mensaje = 'Cron correcto'; $cabeceras = 'From: admin@huerto.com' . "\r\n" . 'Reply-To: admin@huerto.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($para, $titulo, $mensaje, $cabeceras); exit; ?>

When trying to create a new cron job I set it like that, but this doesn’t work.

Thanks for the help!

It may take some time for the cron job to activate :slight_smile:

I’m having the same issue with cron jobs. But I had a cron job that was working and today I found it doesn’t work anymore

Cron jobs may work and not work, depending if that job failed or succeeded to be executed :slight_smile:

In other words, it doesn’t works because it doesn’t worked. Nice.

1 Like

Let me explain how a cron job works:

  1. You create a cron job
  2. The server, when the time for the cron job comes, creates a job for itself, and executes it
  3. Our servers normally have tons of jobs pending
  4. That’s why there might be sometimes a delay in executing the cron jobs (and for waking up sleeping websites)
  5. The cron job may fail to execute sometimes :slight_smile:
1 Like

But currently there has to be some technical problem with this. They are not working well, at least not for him or me.

We both have scripts that work well when accessed manually, but cron job isn’t running them.
My script is the same as the one that’s been running for the last month.

Edit: It’s not once in a while that fails, that’s understandable. Right now it’s not running at all.

1 Like

@leandropb

I’ll forward this to our developers :slightly_smiling_face:

1 Like

Update:

The latest feature created by our awesome developers will help you to fix the problem. Let us know what happens next :wink:

I tried that, but now the website doesn’t respond. I will wait a while to see if this continue

Okey, it’s been a few hours and it’s still the same. The repair option disabled my website instead of solve the cron job issue

1 Like

I’m sorry for the issue, our developers will work on that problem Monday

I had schedule cron job for every 10 minutes interval on 28th Jan 2018. According to 10 minutes interval it should get execute 6 times in 1 hour, but it was getting executed only 3 time(after 10 minutes, 20 minutes and 30 minutes) in 1 hour.

I think, after 12th Feb 2018 it was not executed for single time.

So, I delete old cron job and tried to create new cron job. While creating new cron job it is giving following error ‘An internal error has occur. Our developers have already been notified’.

Kindly help to solve this issue.

Again, please wait :slight_smile:

So you are working on it now? I’m having the same issue…

Users still facing the issue please post back here with your registered 000webhost.com EMAIL and a small description of the issue and what happened and I’ll add this to the notes that the developer will see when investigating!

Many thanks and apologies!

Hi,

When I try to create a cron job I get the “internal error occurred” message as mentioned above. I obscured the link in the screenshot to avoid DB issues.

When I go back to to cron jobs it is listed but doesn’t seem to be called.
the php script works fine when I manually call it.

PS: I must say that for a free service the developers/moderators seem to be very responsive, thanks for that.

1 Like

I’ve passed this to a developer now @tautvis

1 Like

I have this same issue. If I refresh the page the cron job shows up but it doesn’t run (it didn’t run once and I had it listed for the whole night).

What is your 000webhostapp URL or registered email address?

@Aperio