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
2
votes
3 answers

call php script from cron job only - deny all other ips

Is there a way to call a script from a cron job only and make it so no other ips can run that script? I have a script that sends notifications to phones. It is supposed to be called by a cron job once day, but sometimes something triggers it and…
Papa De Beau
  • 3,744
  • 18
  • 79
  • 137
2
votes
1 answer

How to add the misfire gracetime and coalesce in the active jobs in apscheduler?

I have 1000 active jobs in the apscheduler(3.0.1).I wanted to add misfire_grace_time and coalesce to all these scheduler jobs. Since these fields can only be added while creating the jobs. Is there any other way to add them? One solution I can think…
tom
  • 3,720
  • 5
  • 26
  • 48
2
votes
1 answer

Crontab CD to Directory

All of my cronjob scripts run from a specific directory. Can I add cd /FOLDER/PATH at the top of the crontab file and expect all scripts to be run from that directory? Currently all my crontab functions are like this (ignore lack of specific run…
Bijan
  • 7,737
  • 18
  • 89
  • 149
2
votes
3 answers

execute PHP AJAX call using cron jobs

I created an HTML page for my client so that every time he goes there, a script is executed to update some data in the database. As soon as he lands on that page, there is an AJAX call made to a Google API, some results are returned and then some…
Erick
  • 823
  • 16
  • 37
2
votes
2 answers

Laravel schedular works manually but not automatically?

I have this in my Kernal.php: $schedule->call('removeTemporaryFiles')->everyMinute(); When I hit php artisan schedule:run it works like charm. But I also ran: * * * * * php /var/www/html/archive/artisan schedule:run >> /dev/null 2>&1 But it is…
Rohan
  • 13,308
  • 21
  • 81
  • 154
2
votes
0 answers

Webmin Scheduled Cron Job Not working

I have a cron job scheduled on my VPS, which runs at manual execution but not when scheduled as a cron job. Command /usr/bin/php -q /var/www/html/cron.php notification sendChatNotication (*yii) is working as expected on shell. I have followed…
TED
  • 1,829
  • 5
  • 18
  • 36
2
votes
0 answers

Cron Job not working when require_once Wordpress file "wp-header.php"

I need a script to be run every minute by a cron job. The script needs to include 2 files including 1 wordpress file, "wp-blog-header.php", and 1 non-wordpress file, my custom functions.php: require_once (__DIR__ .…
karlosuccess
  • 843
  • 1
  • 9
  • 25
2
votes
0 answers

Run private Python script on Google Cloud Platform

for the following problem I need some advice on what would be the best to do: I want to keep track on my emails so I wrote a small Python script which does exactly that. Since it is my GMail account I am looking at and I would like to store the data…
steph
  • 555
  • 2
  • 6
  • 21
2
votes
2 answers

s3cmd not working as cron-task when echos/dates are added

I have a Digital Ocean Droplet (VPS) running Ubuntu 14.04. I have installed s3cmd and am able to run a sync successfully with this command: s3cmd sync --recursive --preserve /srv s3://MY-BUCKET-NAME And if I put that same command in to a .sh to run…
codeview
  • 209
  • 5
  • 15
2
votes
1 answer

Showcase website that will reinstall itself every day?

I have built a showcase Magento installation that I am about to deploy public. I'd like to give people backend access but indeed I don't want their changes to stick - not sure how to go about this. What's the best way? I have seen a Magento…
E.R.
  • 23
  • 2
2
votes
1 answer

admin crontab won't run sudo command

sudo: no tty present and no askpass program specified Hi I am getting the above error when ever I try to get the following crontab to run. */5 * * * * sudo bash /home/admin/scripts/monitor.sh /dev/null 2>&1 I am using nano as the editor to edit…
RussellHarrower
  • 6,470
  • 21
  • 102
  • 204
2
votes
1 answer

When a cron job is set to "run every 5 minutes", does it run every 5 minutes from the moment it's added?

When a cron job is set to "run every 5 minutes", does it run a) every 5 minutes from the moment it's added, or b) every 5 minutes from the zero-minute mark? For example, if a 5-minute cron job is added at 10:17, does it run as per schedule…
ProgrammerGirl
  • 3,157
  • 7
  • 45
  • 82
2
votes
1 answer

Crontab cron job will not run with url with parameter

38 17 5 11 * /usr/bin/sudo -u www /usr/bin/curl -sS "http://123.com/index.php?email=1&test=1" I tried to run this php file that sends an email with a php class once receive these two parameters. But seems cron is not recognizing this…
ey dee ey em
  • 7,991
  • 14
  • 65
  • 121
2
votes
1 answer

How to set a Cron job in Every two hour from 10-19

I had a question before 1 month regarding this. that was the interval of 1 hour and i got exact answer. below is the link to the old question How to set a Cron job in Every one hour from 9:00 am to 6:00 pm ( Monday to Friday ) Thank you Stack Over…
Syam
  • 44
  • 1
  • 7
2
votes
1 answer

How to have synchronize two git bare repositories?

Is possible to clone a git bare repo as a new bare repo ? for example: git init --bare mainRepo.git Then in a remote server: git clone --bare xxx@server:/path/mainRepo.git repoReplica.git And then with a cron job send changes from…
MadMad666
  • 955
  • 3
  • 11
  • 19