Questions tagged [cron]

Cron, a daemon process found in Unix-like computer operating systems, functions as a time-based job scheduler. Any inquiries related to setting up cron for system management or administration purposes do not fall within the scope of this topic.

Executing a Codeigniter PHP function within a controller using Cron Jobs on cPanel every hour

Is it possible to run a PHP function in the controller every hour using cPanel Cron Jobs? During testing, I have decided to execute this function every minute. An example implementation is shown below: class Mycontroller extends CI_Controller { pu ...

The Nestjs cronjob is having trouble accessing the injected service

After setting up a cronjob to call a service from another module, I encountered an issue where the console logged items were displaying correctly when running the method manually from the endpoint. However, once I added back the cronjob decorator, the serv ...

Running a Laravel artisan command on a schedule of every 5 seconds

My current project involves working with a system that sends webhooks whenever there is a change to a resource within the system. These webhooks contain the ID of the updated resource. For instance, if someone modifies product ID 1234 in the system, my ser ...

Executing automated tests with Crontab using Selenium FirefoxDriver

My Debian server is set up and I'm looking to automate tests regularly using crontab or another method for daily execution. I am utilizing Selenium WebDriver 2.45.0 Java Libraries for this task. When running the script via command line, I can successfull ...

Running a series of scheduled tasks multiple times in a clustered Node.js environment

I have implemented a Node JS server cluster environment to maximize the usage of all cores on my server. However, I am facing an issue with a Cron Job that runs daily at 08:00 AM. Because of clustering, it runs multiple times (4 times since the server ha ...

What is a way to automatically run a function at specific intervals in PHP, similar to the setTimeout() function in JavaScript?

I have a JavaScript code snippet that looks like this: setTimeout('$.ajaxCall("notification.update", "", "GET");', 1000); Now, I want to execute the following PHP function every 1000 milliseconds, similar to the above JavaScript code: $notifications = P ...

Running a daily cron job test in a Node.js environment

Currently, I have a cron job set up to run every day at 8:00. In order to test this functionality, I would like to fake the current date for testing purposes. Is there a way to automate this process to increment the date every few minutes? Additionally, ...

What is the best way to properly handle closing database connections when executing Flask API calls within a cron job?

When the cronjob runs, it connects to various databases through different API calls using an admin session. I want to make sure that after each call, the connection is closed properly. While for a normal API call I can use before_request to open and after_ ...

Can multiple subdirectories within the same domain share and utilize the same cron jobs?

Currently, I am tackling a project that involves utilizing one cron job for multiple subdirectories under the same domain name. The specific directories in question are: www.abc.com/first www.abc.com/second www.abc.com/third If anyone has insights on h ...

Can the performance of a system be impacted by node.js cron?

I am looking to incorporate a cron module (such as later or node-cron) into my node server for job scheduling. The jobs in question involve sending notifications (e.g., email) to remind users to update their profile picture if they haven't done so within ...

Is the commented out cron task in GAE being executed?

Recently, I was involved in a project that hosts its application on GAE. During a late-night deployment to the QA server (also on GAE), a cron job in the cron.yaml file was commented out. To my surprise, the cron task ran as soon as the deployment was com ...

Troubleshooting Issues with Job Scheduling in Next.js Using node-cron on Vercel Deployments

I've been attempting to configure scheduled tasks in my Next.js application hosted on Vercel using the node-cron library, but I'm facing a problem where the tasks are not being executed as expected. Despite following the official documentation and various ...

Problem with Elysia Cron in Drupal 7: Invalid key causing Cron to fail

Our Drupal websites utilize Elysia Cron and have an external CRON tab set up to access the CRON URL at . Unfortunately, upon checking the logs, we encountered an error message stating: "Cron could not run because an invalid key was used". ...

What are the steps to set up a cronjob?

After extensive research online, I have been unable to come across any concise explanations regarding the functionality of cronjobs. My main concern is understanding where to designate the specific time for these commands to execute. During my search, I d ...

Complete tasks at various times throughout the day

I am facing a challenge with running a list of over 20 tasks. The issue is that I cannot run them all simultaneously, and the number of tasks to be run each day varies. Here is my current approach : I have set up a cron job that runs daily This cron job ...

Comparison between Windows Task Scheduler and Node's Cron Scheduler

We are currently developing an application that will manage scheduled SMS sending. Our setup involves a Windows server and we rely on the Task Scheduler provided by Windows for this functionality. However, I am not completely satisfied with this tool. We u ...

Trigger/cease cron job with the click of a button within a Node.js Express application

I have been working on a project that involves starting and stopping a cron scheduler when a user interacts with a button on the front end. Essentially, clicking the start button initiates the cron job, while clicking the stop button halts the timer. It's ...

Automaton ScheduleTask Feature

I'm struggling to understand how to make this work. My goal is to set up Hubot to automatically call a function at regular intervals in a specific HipChat channel. Currently, I have it working by requiring the user to type "Hubot totalviewers" in the ...

Unpredictable selection of elements displayed as links

As someone who is relatively new to PHP and HTML, I am working on a website that features a product of the week. However, I have hit a roadblock in implementing my idea. My concept involves creating an array with various products and using array_rand to s ...

Using Crontab with Pipenv

In short, I'm using Ubuntu 20.04 and need to add a crontab task to run a Python script with pipenv run that includes SELENIUM CHROMEDRIVER. I've attempted the following: 0 9 * * 1-5 @user . cd /home/... ; pipenv run python file.py > /home/.. ...

Executing PHP scripts using a Docker container

I have successfully set up my project with docker-compose and nginx using php7-fpm. The PHP page is functioning perfectly on this setup. However, I now face the challenge of running some PHP scripts as part of a Cron Job without installing PHP on the host ...

Scheduling a cron job to run at a particular date and time

Our express js application includes a feature in the admin module where users can send emails at specific dates and times they select. For example, if the chosen date and time is [email protected], we need to execute the email code at that exact time ...

Executing node.js script through cron results in a failure, while running it manually functions properly

I've been trying to execute a script from cron during boot, but despite researching Path variables, none of the solutions I found have resolved my issue. This is the cron command I'm using: @reboot /home/pi/nodestart.sh And here is the content of the sc ...

Tips for continuing to write to the same CSV file without starting over

Currently, I am utilizing a nodejs package to write data to a CSV file every minute. The initial creation of the file and the first write operation work fine. However, when attempting to write to the same file again, I encounter an error in nodejs. Despite ...

Is it possible for a cronjob to run continuously for a span of 30 minutes?

Recently, I developed a PHP script that generates cache files from an API. Unfortunately, the process takes about 30 minutes to complete loading all the necessary files for the page. I reached out to my hostinger's customer support team who advised m ...

Automated Email Delivery System in PHP using Cronjob

I have a website online and I am looking to set up CronJob to send newsletters every Monday. Currently, I am using PHP for this task but I seem to be facing some challenges. Specifically, I have a mail() function that is responsible for sending emails to a ...

Setting up a Cron Job in cPanel to Automate Task Scheduling in Laravel

Just like the title suggests, I followed the documentation to set up a cron job but it's not working. There are no updates in the laravel.log file either, which could have provided some insight. Here is how I configured my cron job: https://i.stack.i ...

Are you familiar with the concept of using predefined tasks in PHP with Cron

Is there a way to run a scheduled script that posts new content to my website at various random times? I may need to post data on different days and times, such as Monday at 9am and Tuesday at midday. I was considering using a database to store each piece ...

Sending a JSON object with scheduled task cron job

I have a PHP cron job that is quite complex. It retrieves data from an external webpage and consolidates all the information into one variable, encoding it in JSON. Unfortunately, this entire process is slow and consumes a significant amount of time. My d ...

Starting PM2 with multiple instances can be achieved by following these steps

While running my nodejs code with PM2, I encountered a requirement for multiple instances of nodejs executing the same code. To address this need, I created a script named "myscript.sh": cd ~/myproject PM2_HOME='.pm2_1' /usr/local/bin/node /usr/local/l ...

Is it as straightforward as configuring a cron job in cPanel to execute a PHP script?

I've been trying to configure a cron job through cPanel. I followed the steps, but my PHP file includes a basic mail function for testing purposes and it's not functioning properly. Although I came across some detailed tutorials on how to set up cron jobs ...

Have you ever noticed how Angular-cron-jobs consistently produces identical cron expressions for tasks such as "Every Minute," "Every Hour at 0 past hour," "Every Day at 0:0," and so on?

If you experiment with DEMO BASIC on , you will notice that "Every Minute", "Every Hour at 0 past hour", "Every Day at 0:0", and "Every Week on at 0:0" all result in the same expression: *****. A similar issue arises when selecting Every Year, as regardle ...

Executing a PHP script as a cron job with Plesk version 10.3.1

I have encountered an issue with my php script that logs its running time in a text log file. While the script runs fine from the browser, I am facing difficulties when trying to run it using scheduled tasks in my plesk 10.3.1 panel. The command I am using ...

What is the best way to get a server to continuously request a JSON file at regular intervals?

I am currently dealing with updating and displaying real-time information from a third-party JSON file that is approximately 1MB in size. The challenge lies in the fact that this JSON file updates constantly, and my access key may be revoked if users direc ...

Issue with running Selenium script from console compared to CRON, encountering Geckodriver error

My Selenium script is set up to run from an SH file. When I manually execute the SH file from the console, everything works perfectly. However, when I schedule the file to run from a Cron job, it fails. This is the content of my SH file: #!/bin/sh expor ...

Error message encountered in node-schedule: Unable to read undefined property upon job restart

Using node-schedule, I have successfully scheduled jobs on my node server by pushing them into an array like this: jobs.push(schedule.scheduleJob(date, () => end_auction(req.body.item.url))); Everything is working as expected. When the designated date ...

Launch the Node.js server by setting up a scheduled task using cron

I have recently developed an API in node.js, and it is now live in production. However, I find myself constantly needing to open Cpanel and the terminal to manually start the API using commands. I am looking for a way to run a one-time command in the termi ...

Failed cron job in Google App Engine Python environments is causing issues

I am encountering an issue with a script running on Google Appengine that is triggered every 20 minutes by the cron.yaml file. The script runs successfully when tested locally on my machine and even when manually accessed online, but fails to complete when ...

Changing the locale in Silverstripe with the fluent module

Good day, I am curious if anyone is aware of a way to manually set the locale. I need to update some items in the database based on the locale using a cronjob, but instead of using the server's locale, I want to set it based on certain variables. Is ...

Python Script for Scanning a Website for a Specific Tag

Currently, I am exploring the process of creating a website monitoring script (which will eventually be set up as a cron job) that can access a specified URL, verify the presence of a specific tag. If the tag is not found or does not contain the expected i ...

Is it time to refresh the supervisor's Python instance with Crontab?

Encountering a strange issue while utilizing crontab to restart a supervisor python instance. Here are the specifics: Implemented a basic Python script with some scheduled jobs (apscheduler) The script requires supervision by supervisor, configured it a ...

Multiple minute delays are causing issues for the Cron server due to the use of setTimeout()

I have an active 'cron' server that is responsible for executing timed commands scheduled in the future. This server is dedicated solely to this task. On my personal laptop, everything runs smoothly and functions are executed on time. However, ...

Update a scheduled task from invoking through a URL with cURL to invoking through the local command line using PHP

I currently have a cron file named cron.php. Within this file, I am implementing the curl_multi approach to initiate sub parallel tasks. For example, the crontab in cpanel will execute this script every minute: curl http://mywebsite.com/cron.php Within ...

The Crone job in Node.js fails to run on the first day of each month

cron.schedule('* * * 1 *', function () {//do something }) I am attempting to set up a cron job that triggers on the first day of every month. However, for some reason, it doesn't seem to be working as expected. Can anyone help me identify w ...

Setting up a job scheduler with Mysql and PHP for Crone tasks

Within my database, there exists a table known as 'vehicle master' that contains various fields related to vehicles. vhcl_no department vhcl_type vhcl_make fuel_type chassis_no engine_no manufacture_on cubic_capacity rcbook_no rcbook_valid_till ...

NodeJS is constantly refreshing the data in the database table

Every day, I use a cron job to scrape data and insert it into a database. However, I'm facing an issue where the database results on the server do not refresh themselves after new data is inserted. I've come across 2 solutions here, but one was difficult ...

Determine the current iteration index within recurring tasks using BullJS

When working with repeatable job callbacks, I often need to perform specific actions at a certain point in the script. For instance: const Bull = require('bull'); const queue = new Bull('payment'); // This task should run every 5 minut ...