166 comments found.
hello, would it be possible to make api calls on remote server, when needed, instead of creating cron jobs? Are you customizing this scripi, if needed?
Hello, if you want to manually trigger HTTP request then you need to create a job and set status to “Disabled”. Then when needed click on “Test cron job manually” icon on the Dashboard page to run the job manually.
hello.. will this scritp work on a localhost windows server (apache / php / mysql)?
Yii2 ( I do not think Yii3 is ready yet..)?
Hi. Yes, it’s Yii2. It can be run on Windows, but you need to: 1. Make sure you meet minimum requirements. You can download and run the following PHP script in a browser that checks PHP info: http://webcron.php8developer.com/requirements.php
2. Add a task to the Windows scheduler. https://www.youtube.com/watch?v=s_EMsHlDPnE
Read this to find out the path of master cron job. https://docs.php8developer.com/web-cronjobs/#/installation?id=native
Regards
Hello Forza020
Can you please send me this 2 SQL query to flush/delete the Statistic from the database. I want to flush: Failed and Success Row.
Thanks a lot.
I got it.
Hello,
You can clear the logs either by clicking on “Clear Logs” in the left menu or by running a CLI command.
Regards
Hello forza020,
To upgrade the script, I just need to replace all the files on top of the old version ?
Thanks for this great software.
Hello sir,
There is a link to the changelog on the product’s page. Please follow all the steps so as not to break anything.
https://docs.php8developer.com/web-cronjobs/#/changelog?id=v-111Regards,
Roman
Thanks. One more thing, I don’t know the version I have. Do i need to update version by version, or can I just upgrade to new version just following your steps ?
What the purchase date is?
Don’t remember, but I left my review 11 Months ago. That what it shows in the Reviews. I think in that same week. You help me configure I remember. Maybe on February 2023.
So you are on the penultimate version, so open the link I sent you, and carefully follow 6 steps.
Thanks, so I need to do V 4.14 all steps then V 4.15 ?
Can you re-open the link? I sent you the wrong at the first time. The version is 1.11
I re-open the link you send me. It has the full Log, from 4.0 to 4.15. I can see version by versions.
Penultimate version is V 4.14 ? (My reviews were around February 2023) and V 4.13 is from January 29, 2023.
I just need to upgrade: to V4.14 all steps and then V.4.15 ?
This one please
Thanks. Just to confirm, only do V 1.11 all 6 steps ?
Yes
It would be nice and useful to add the ability to substitute in commands in future releases.
For example, in somewhere manager I create substitutions patterns:
{php-7} = ’/opt/php70/bin/php’;
{php-8} = ’/opt/php80/bin/php’;
{token} = ‘abcdef00’; And etc…
And then I can using in task command:
{php-7} /var/www/html/tasks/command.php—key={token} in result will be executed: /opt/php70/bin/php /var/www/html/tasks/command.php—key=abcdef00.
This will make it more convenient to service a large number of similar tasks.
I like the idea. I’ll think about how it can be implemented.
Why does one task never write any logs? Although the launches occur and the script outputs a response but Cronjobs does not save them? Others tasks saves logs
It’s hard to tell why without looking at the exact job. From the code point of view, each task emits a log line in any case. Can you provide more details?
1. Is it an HTTP or CLI task?
2. How do those “empty log” lines look like? Can you send me a screenshot by email?
1. This tasks is CLI
2. “empty log” is no log. For example, I noticed when I added new task, several times task lanches, but no any log added. In Statistic column i see “There are no statistics”, but task lanches and finishes corrects.
Currently, in our system 99 tasks in total. We have CLI and HTTP tasks, and periodically adding new tasks.
At one point, we also increased the limits in the configuration $batchUrl and $bathCommand, as we noticed that tasks simply did not start at the required time.
When you manually run that task (via the web interface) do you see an output? Does this task have the following ending or similar ” >/dev/null 2>&1”?
Increasing batch $batch* variables is a good idea when you have enough resources to start many processes simultaneously.
If I run it manually, it seems like everything is always fine.
Our tasks no any use the background execution suffix (...&).
I also notice that tasks that finish quickly and run frequently (for example, every minute or */2 minutes) may be delayed in starting.
For example, the timing of a task is set to executes every minute, and it takes 10-15 seconds to complete it. But the Cronjobs App shows that its next launch is 10:46:00, while the current time is already 10:52, and such a difference can reach, on average, up to 10 minutes.
We have a lot of tasks in the queue. Some work very quickly, some can work for several hours.
Native Linux-cron launches the master task of framework stably every minute – could there be some kind of collision or delay in the launch or in saving logs of completed tasks? This is a hypothesis, because I don’t know the exact logic behind how the Cronjobs works.
In terms of resources, there are enough of them – this is a dedicated server with several physical processors and a large amount of memory. Previously, all these tasks worked for us through native cron.
We have a lot of tasks in the queue. Some work very quickly, some can work for several hours.
Let me briefly explain how the master cron task works.
1. There are two types of jobs: CLI and HTTP. The jobs in these groups are executed one after the other synchronously.
2. Jobs in those groups are split into batches. This is where “batchUrl” and “batchCommand” emerge.
3. Let’s say “batchCommand” is equal to 10, but we have 15 jobs in the queue. The script gets the first 10, runs all of them asynchronously and waits until all of them are finished. The remaining 5 tasks are waiting for the next batch to process – they are not picked up by the new process of master script.
4. The next time launch calculates just before batch processing. This is done because some tasks may run slowly, so another instance of the master PHP script, which is triggered by the native Linux cron job system, will pick up those jobs for processing, even when the slow batch group is still running in the previous master script.
So, how to address the situation when you have a lot of fast and slow scripts?
Well, you can increase the “batchCommand” to the total number (or more) of your jobs. So all of them would be processed in one large queue asynchronously (make sure, you don’t have limits of the maximum child processes).
Alternatively, you can try to install another instance of web-cronjob into a subdomain, set up the master PHP cron script for that instance, and run there only slow tasks.
Speaking about the issue with logs: try to increase the wait_timeout directive in the my.cnf MySQL configuration file and restart the database.wait_timeout = 28800
Regards,
Roman
Thanks for descriptions above.
Regarding to logs and timeout – this is also quite possible. But we specifically set a low global timeout in the server settings, because there is one DBsrv, but there are many applications.
And we have moved the timeout change to the application level through the request “SET wait_timeout=...” after establishing a connection. Each our app and script decides for itself how much processing time it required.
Is it possible in the Cronjobs somewhere in the config to set a higher timeout when using DB, or let app check connection before try save logs (or any manipulation with DB), and if no connection, perform reconnect.
Is it possible in the Cronjobs somewhere in the config to set a higher timeout when using DB
Yes, you can do that. Try to open the protected/config/db.php file and append the following lines to the array:
<?php
return [
...
'on afterOpen' => function($event) {
$event->sender->pdo->exec('SET wait_timeout=28800');
},
];
Didn’t test in the wild, but should do the trick.
Thank you! The callback with `SET` request helped a lot, I see that now many logs are saved!
I’ll add a “Task priority” feature in the next update to make it possible to run quick jobs first, and slow at the end of the queue. I’ll also consider adding the `wait_timeout` directive to the config file.
Woow! “Task Priority” is a much needed feature. At least for us. I’ll be watching for updates!
Hi, I bought your product today, and I was able to install it successfully. But I need help on how to set the master cron job. Please help.
Hi. What type of backend hosting management do you have? Cpanel, plesk, ssh (VPS), etc?
I’m using shared hosting, I don’t know if it is CPanel but I’m sure it is not VPS. If possible I can share my server credentials to you so that you can investigate more.
I have seen your email to which you replied to me, and I have also replied back in which I have shared my server credentials, please check THE LAST E-MAIL I SENT TO YOU. Thank you.
I am looking for my client a project like this but i have some questions: 1. is it support bash file for cornjobs task? 2. is there any limitation? 3. can i run it in live server for remote projects? 4. Is there any online demo wehre i check it. My client is using one the free available cornjob service available on the internet but he is planning for own corn-job code to avoid any issue. I am waiting for your replay thanks
Hello,
1. Yes, it does. The bash script should be located on the same server where the cronjob script is installed. Moreover, you can run any binary installed on your server, not only bash scripts.
2. There are no code “execution” limitations, but there are some requirements that your hosting needs to meet:
- proc_open function must be available in your PHP environment. You can download this PHP script, upload it on your server and run it in a browser to see whether you meet the minimum requirements: https://webcron.php8developer.com/requirements.php
- Your hosting must support native cron jobs with allowance to execute every-minute scripts. This script is not a magic tool but relies on the underlying native OS crontabs.
3. Yes, you can.
4. Use the publicly available demo to test any URL you want https://codecanyon.net/item/web-cronjobs/15716288#item-description__applications-demo The demo doesn’t support Bash/sh script execution.
Regards
Hello, In add/edit task page (shell type) has Timeout tab, and there should be number above 0. But if I want don’t ajust predefined timeout for task, this feature available? And what happend if called application work more that entered Interval value?
Hello,
The 0 means an unlimited timeout. You should always set a reasonable time here. Suppose you expect your script’s average run time to be 10-30 seconds, so put it 50.
On the other hand, if you enter a 20-second timeout but your script runs about ~30, then it will be terminated by sending a SIGKILL signal after 20 sec.
Each new cronjob time frame doesn’t wait for the completion of the previous job. So let’s say you set an every-minute cron process that takes 1 hour to complete. After 59 minutes your server will be running 59 processes of that script.
Regards
Thanks for describe about timeouting. We need an unlimited timeout for many tasks. But in <Timeout> tab we cannot set unlimited timeout = 0. Because browser tels “Please select a value that is no less than 1”. Could you help fix it.
Sorry for the misunderstanding, Yes, the timeout is mandatory for CLI processes. Just put the large number there, for example, `2592000` is equal to 1 month. I believe this is more than enough.
the older version work with php 7.4. but the latest version is not working in any php version. cronjob not work, only work on manual test
Hey. Can you send me FTP credentials? I’ll take a look what is wrong with your script.
I’ve sent you the ftp access.
Check your email.
Problem solved, it’s because my system default PHP is PHP7.0. So I run the master cron with PHP8.0 and everything now working.
Great! By the way, the script minimum supported version is 7.4.
Hi, my hosting provider only supports morning, day, evening and night cron jobs and was wondering how this app would work for me? I need an app like this to run multiple cron jobs in 5-10mins sequences.
Hi. This script depends on an underlying schedule system like Cornjobs on Linux or Task Scheduler on Windows. If your hosting has a limited number of runs i.e. it cannot run every minute cron task, then the script will not be able to handle every-minute jobs set via the web interface.
Hi. I use WAMP to run CRM in localhost. I need to run such cron command: “wget q -O http://localhost/crm/cron/index" Is it possible with “Web Cronjobs”. Thank you?
Hi,
Yes you can, but you need to:
1. Install the cron jobs script on the same machine on localhost.
2. As I understand you’re running on Windows, so make sure that “wget” binary is accessible globally (You can add the binary path to the Windows PATH env variable).
3. Make sure that the “proc_open” function is available in your PHP environment.
You can bypass 2-3 items by creating a simple HTTP task which triggers your URL by using PHP cURL without involving extra process + extra binary.
4. You need to add a scheduled task to automatically run the corn master script (which triggers all the tasks that you set up via the web interface).
Regards
Amazing product, using it for couple of years already
Any plans to make a multi server cron ( with one admin panel) ?
Thank you. Unfortunately, no such plan in the near future.
Hello, I follow every thing in the installation, but I get this error when try to log in:
Unable to verify your data submission. The above error occurred while the Web server was processing your request.
Hello sir,
Sorry for the late response. I was away. Can you send me FTP creds and a link to the online version by email?
Trying to get property ‘timezone’ of non-object Models/User.php public function getDateObject($time=’now’) { return new DateTime($time, new DateTimeZone($this->settings->timezone)); } can you help me….
Hello sir,
Can you contact me by email? Include please FTP credentials.
Regards, Roman
can you do remote with anydesk software? I will send anydesk id via email
Let’s try, but we need to coordinate the time.
when do you have time? let me know by email enkf727@gmail.com
The email has been sent
okay, thank you, let’s continue to email,
Hi, I have installed it and checked all requirements and server passed all. But when i try to run its not working, but manual check work… can you help
Did you install the master cron script? https://docs.php8developer.com/web-cronjobs/#/installation?id=native
Hello, would it help me to execute CRON tasks for the WP ALL IMPORT plugin?
Hello. This script can either periodically trigger any given URL or execute any CLI command which is on the same server as Webcron.
Hi,
How to migrate to another server?
Hi,
Do a backup of the files and the database. Next, upload those files into the new server, import the database dump, adjust configuration params (for example baseUrl), setup the master cron job. https://docs.php8developer.com/web-cronjobs/#/installation?id=cron-jobs
OK, thanks!
Its looks like not support for PHP7.3. Is that possible to with PHP7.3? Is there minor changes for that?
The minimum supported version is PHP 7.4
hello, i update the script but An internal server error occurred. i am using apachi server, i also add the path to htacess but still same eror.
Please send me cPanel / plesk / etc credentials by the email.
all ok, thank you so much
I’m glad you solve that 
thank you for one of the best codecanyon product you created for us!... regards
Thank you!