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
1
vote
0 answers

Bash script running manually but fails with cron job

I have a bash script:start_jenkins.sh which starts a java process. the command in the script start_jenkins.sh is #!/bin/bash echo "starting Jenkins service...... " nohup java -jar /local/home/mona/jenkins/jenkins.war --httpPort=2261 >…
m0na
  • 11
  • 4
1
vote
1 answer

How to run a bash script from crontab and send the output to desktop notifications

I'm trying to get the RAID status every time i boot into my system (Debian) and send the output as notification in the desktop. This works as expected from terminal: sudo mdadm --detail /dev/md0 | grep 'Working Devices :' | while read OUTPUT; do…
Xbert
  • 91
  • 1
  • 1
  • 5
1
vote
1 answer

Running cron job with id

Hi good day i was using cron job for task here is my cronjob script is like cronjob.php?cron=1 but that link not working iam getting email like cron cant abe to open input file why cron dont get id
Danial Afridi
  • 97
  • 1
  • 4
1
vote
1 answer

Default timezone for a recurring job on HangFire

Does anyone know the default timezone used by Hangfire when setting up a recurring job? I suspect it is UTC and not the timezone of the host server.
user2818985
  • 380
  • 3
  • 10
1
vote
0 answers

How to Delete many Cron Job Log files in Cpanel

How Do I delete about 5,000 Cron job log files in a Cpanel. The files are so many and I need to remove those files with the name shown in the image link attached here. https://i.stack.imgur.com/ScnCR.png
CodeRed
  • 81
  • 2
  • 10
1
vote
1 answer

How to schedule a Cronjob so it executes all R scripts in a file

I want to schedule a cronjob so it executes every R script I put into a certain directory. From another post on this site I've seen the following code: 0 0 * * * cd /home/script2; Rscript scriptSecos.R >/dev/null 2>&1 This would run the RScript…
1
vote
2 answers

Scheduled task after server restart or crash

I have some question related to the @Scheduled task in spring boot application I have some microservice that send an email every month. I have @Scheduled(cron="every month expression"). But just imagine that I have run this service for 15 days (but…
1
vote
1 answer

How to remove empty folders and subfolders using cronjob

I found a script online that works when entered into custom cronjobs on cpanel. When i run this script, the code deletes the folder and everything within it. rm -rf public_html/storage_area/images/ I would like to delete empty sub-folders housed…
GIDUBZ86
  • 15
  • 8
1
vote
1 answer

How can we allow user to set a cron JOB from frontend in Laravel?

I have a setting section in my laravel application. In this section I have a setting for defining a sync time. So the user can set their preferred time for sync data from laravel application to a third party CRM(Salesforce). For now, I am storing a…
Kishor Patidar
  • 623
  • 12
  • 23
1
vote
2 answers

Run Cron at Minute 0 of Specific Hour Set

What I'm trying to do is run a Cron job at specific hours such as 1,9,13,16 but only once for each of those hours. Setting it up every few hours doesn't work for me because it needs to be at specific hours. This is what I'm currently using but it…
stwhite
  • 3,156
  • 4
  • 37
  • 70
1
vote
1 answer

different behaviour on double click on batch file and execute it in cronjob

I'm learning how to create an automatic script in python (3.7) and I've noticed of these different behaviours: (The python script is not relevant in this question but it works quite well so that I'm sure the answer of my question isn't here). Case…
cooper
  • 635
  • 1
  • 8
  • 23
1
vote
1 answer

Cron Job in Firebase

How can I create a cron job in firebase real time database, i have an application for android and the app has a reward , whe the user get a reward in the backend i update a bool var Gift to true and he user can get the reward only if the Gift is…
Bryansq2nt
  • 394
  • 6
  • 16
1
vote
1 answer

How to achieve Google App engine redundancy with NodeJs

I have a NodeJs project on app engine (GAE) . Whenever there is an unexpected crash in a service call the NodeJs has to restart (I believe this is normal) , however, this leaves the whole server unaivailable for a couple of seconds which may affect…
htafoya
  • 18,261
  • 11
  • 80
  • 104
1
vote
1 answer

Cron service not starting with docker container

I have been trying to run a cron job within my docker container and I can't seem to get the cron service to run when the container is started. I can remote into the running container and run "cron" to get the service to start without issues. I have…
Sam Munroe
  • 1,266
  • 2
  • 20
  • 41
1
vote
1 answer

Problem with cron job which has to run every 15 minutes but not at 15,30,45

So i have a cron job that runs and executes fine (hence why no path is shown) at: */15 * * * * but I don't want that as it means it runs at every fifteen minutes past 0 of the hour according to crontab.guru which gives tasks run at 15,30 and 45…
MartinJJ
  • 337
  • 1
  • 6
  • 16