Use cron job to click the button

Hi, can I know is it possible to use the cron job to trigger the button in a webpage which schedule on everyday?

Without writing clearly, the answer is no.

1 Like

I mean how to use the cron job to click the button in the webpage since it has only 2 option for set the time and also run the script.

If the button runs a script, then just type the script URL in the box when setting up the crib job. But as KangJL said, if you do not provide some detail, we can’t help you effectively.


A cron job can only be used to run a script. If you can write a script to click the ‘button’, then yes, it is possible.


The cron job scheduling is weird. I’ve tried to explain it in this article:

As far as you action goes, it depends. The cron job calls a specified URL at the specified schedule. This can be any URL on your website. It’s a GET request, not POST, and doesn’t interact with your website HTML code. So it can’t “click the button”, but it should be able to trigger the same actions as clicking the button would do.


Sorry for late reply admin, so I think I know what should I do already, but I have a question. What is the meaning of “On free hosting any cron jobs added here MUST complete in 5 seconds or the job will be removed automatically. If you need long running cron jobs please upgrade”. I confuse about this.

As in the script you are calling must take 5 seconds or less to complete. This is not a problem for most people.


I See, thanks for your explaination. Btw, if I set cron job to run the command which run every 12 hours, is it count as start from the time we set the cron job command?

To the best of my knowledge, yes.


I see, thanks for your helping.

1 Like

You can’t set a cron job to run less frequently than once per hour.

The scheduling is stupid. Please see the article I linked to for more info.