Questions tagged [cron-task]

cron-task is a task (command or shell script) executed periodically at certain times or dates by the cron scheduler.

Resources

925 questions
3
votes
1 answer

Execute ruby gem via cron

I am trying to solve a bit a of mystery here... We have created an gem which is called via cron. The mystery is: This works on machine A but not on machine B the environments are identical as far as I can tell. Both machines are Mac OS X 10.6. I…
Michael
  • 3,568
  • 3
  • 37
  • 50
2
votes
2 answers

How to run a PHP script with cronjob?

I'm trying to run a PHP script, like writing something in a txt file. If I manually load the file it works, but not with a cron job. I have cPanel and I followed what I read in the help page, but nothing works. I tried this command php -q…
Pedro Soares
  • 623
  • 2
  • 10
  • 15
2
votes
2 answers

run cron job on end of every month

I need to run a script at 2 pm on the end of every month. The reason i set 2 pm is i've a timezone of asia/calcutta and it differs 10 hrs and 30 min. from the server time. I've set date_default_timezone_set('Asia/Calcutta') in my script, so for the…
vkGunasekaran
  • 6,668
  • 7
  • 50
  • 59
2
votes
1 answer

How to use scheduled tasks with app infrastructure?

we created a custom entity API within an app infrastructure and would like to have a cronjob, deleting all entries older that particular number of days. Is there an App (cloud) way to register such a task? Otherwise I see two options: either…
2
votes
3 answers

How to schedule mail to get send every Thursday at 1pm

class SendLostwillEmailsController extends Controller { public function runCommand() { return $this->getAllLostWill(); } protected function getAllLostWill() { try { $status = false; …
user022yufjb
  • 157
  • 1
  • 3
  • 11
2
votes
1 answer

how to stop action scheduler 3.0 in wordpress 6.0?

I want to stop all my action scheduler when I am login in my wp-admin, instead of it I want to manage all cron should be handle by cron background of my server. is it possible please tell me the way I already spend lot of time to stop it from…
2
votes
1 answer

cronR minutely task overlapping?

I'm adding a new minutely cron task as follows: library(cronR) cron_datamultiple <- cron_rscript("multiple_data.R") cron_add(command = cron_datamultiple, frequency = 'minutely', id = 'test1', description = 'My process 1', tags = c('test1'),…
Serhat Akay
  • 115
  • 10
2
votes
0 answers

Automating python3 program with .sh file and anacron job; config issues

I am working on a project that pulls data to a database, and we'd like to use Anacrontab to automate the running of this program. I've created a dummy program (located in /etc/ directory) that simply appends a timestamp every time the program was…
2
votes
0 answers

How do we use JWT tokens for system to system calls for scheduled operations?

We have an app that let's a user sign in and generate an excel report. User would fill in details then submit. These details would first get saved in the DB and would be fetched at a later time by a cron job to create the excel reports. By this time…
Al Cruz
  • 21
  • 1
2
votes
2 answers

How can I make my server allow my PHP script process to run for 75 minutes instead of disconnecting after only 45 minutes?

I am trying to save an mp4 file from audio live stream by PHP script initiated by cron job. It's expected to work for 75 minutes, but the problem is it runs for only 45 minutes. I found that the server may disconnect the process and not allow the…
Ahmed Gabr
  • 136
  • 3
  • 7
2
votes
1 answer

Cron job from 9am to 5pm EVERY day

I wrote a schedule/cron job with the following expression "0 9-17 * * *" as I wanted it to run everyday from 9am to 5pm, every hour. However the callback function was only executed for day 1 and not for everyday. const job = schedule.scheduleJob("0…
N.A
  • 187
  • 1
  • 1
  • 5
2
votes
2 answers

(shell script file) pm2: command not found in crontab task

my shell script #!/bin/bash pm2 start server.js my crontab task * * * * * /home/ec2-user/abcd/test.sh > /home/ec2-user/cron.log 2>&1 What I got from the log: home/ec2-user/abcd/test.sh: line 2: pm2: command not found how to fix…
JustFun2020
  • 121
  • 2
  • 7
2
votes
1 answer

Control TP-Link Kasa local switches with Bash

I installed the python-kasa library to control TPLink smart home devices from my local server. while issuing commands from the command line is simple, I'm trying to execute them in Bash based on result of the query. My dilemma is purely my coding…
David
  • 131
  • 1
  • 11
2
votes
1 answer

Send GIF image in mail by cron job

I want to send an email with PHP script which include a gif image in it. It executed successfully(send mail with GIF Image) when I run it via browser URL, but when I run it via cron job/ schedule task it send only the mail body without GIF…
Shalini
  • 131
  • 1
  • 10
2
votes
0 answers

Will Laravel Task Scheduling Work with 5 minute cron jobs?

I'm on shared hosting that will only allow me to schedule cron jobs as frequently as 5 minutes apart. In Laravel's documentation, it notes that the cron job should be run per minute. My schedule has a task running everyFiveMinutes(). It doesn't…
Jeremy L.
  • 853
  • 8
  • 15