cron

How to create cron jobs dynamically in firebase [duplicate]

徘徊边缘 提交于 2020-06-17 13:13:05
问题 This question already has an answer here : How to create cron jobs in firebase programmatically (1 answer) Closed 14 days ago . Does anyone know how can I set up Cron Jobs dynamically with Firebase? I want to build a rule engine using which the Client can specify the rules, actions, and schedule and based on that I need to schedule that particular rule. Since the scheduling is in the hand of the Client. I can set a predefined frequency for the JOB. I know in Node.js I can do it with libraries

CRON JOB - Schedule Laravel command for different timezones - Manage users local time

蹲街弑〆低调 提交于 2020-06-10 07:26:10
问题 I'm using Laravel 5.4 and I like to send notifications to users on thursdays at 8pm Let's say I have User A in Tokyo User B in London User C in New York City Questions How should I set the CRON JOB so they all receive the notification at 8pm in their local time?. My server is in New York City Code $schedule->command('sendNotifications')->dailyAt('20:00')->thursdays() 回答1: This Logic can't be done just with just one: $schedule->command('sendNotifications') command and some parameters. First

Cron BAD FILE MODE vs permission denied

☆樱花仙子☆ 提交于 2020-06-01 03:08:27
问题 I have a cron job for backuping my databases: ➜ ~ crontab -l @daily /etc/cron.d/pg_backup.sh There is a problem with setting appropriate permissions, though. When I have: ➜ ~ ls -l /etc/cron.d/pg_backup.sh -rwxr-xr--. 1 root root 1359 Apr 14 21:39 /etc/cron.d/pg_backup.sh and then check grep "pg_backup.sh" /var/log/cron , I see: localhost crond[11881]: (root) BAD FILE MODE (/etc/cron.d/pg_backup.sh) However, when I modify pg_backup.sh as: chmod 644 pg_backup.sh It disables the warning:

telegram bot with cron and PHP script

浪子不回头ぞ 提交于 2020-05-31 05:41:34
问题 on EC2 I have a crontab like that * * * * * /usr/bin/php /opt/bitnami/apache2/htdocs/bot.php The bot.php file 1 <?php 2 3 exec( 'touch /opt/bitnami/apache2/htdocs/testCron.txt'); 4 5 $botToken="xxxxxxxxxxxxx"; 6 7 $website="https://api.telegram.org/bot".$botToken; 8 $chatId=123456; 9 $params=[ 10 'chat_id'=>$chatId, 11 'text'=>'test bitnami', 12 ]; 13 $ch = curl_init($website . '/sendMessage'); 14 curl_setopt($ch, CURLOPT_HEADER, false); 15 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 16 curl

ISSUES Defining Cron jobs in Procfile (Heroku) using apscheduler for Django project

人盡茶涼 提交于 2020-05-27 05:11:08
问题 I am having a problem scheduling a cron job which requires scraping a website and storing it as part of the model (MOVIE) in the database. The problem is that the model seems to get loaded before Procfile is executed. How should I create a cron job which runs internally in the background and storing scraped information into the database? Here are my codes: Procfile: web: python manage.py runserver 0.0.0.0:$PORT scheduler: python cinemas/scheduler.py scheduler.py: # More code above from

Crontab - passing environment variables from ~/.bashrc

这一生的挚爱 提交于 2020-05-17 06:12:06
问题 I'v hit a brick wall with crontab... I'm trying to set a crontab to run a python script that gathers 4 variables from ~/.bashrc Bellow my current crontab. SHELL=/bin/bash BASH_ENV=/home/m.bienias/.bashrc # m h dom mon dow command 30 12,15,18 * * 1,2,3,4,5 source /home/m.bienias/.bashrc; /usr/bin/python3 /home/m.bienias/skrypty/mail_reporter/Kwanty_bez_eng.py >> /home/m.bienias/cron-log/mail_reporter.log 2>&1``` I have tried ```source /home/m.bienias/.bashrc;``` and ```. /home/m.bienias/

Is there a problem to use queue:work on a cron job? [closed]

核能气质少年 提交于 2020-05-16 04:35:41
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 9 months ago . I've deployed my laravel application on hostinger, and it has some queue jobs (as sending e-mails), I added a cron job with the artisan command "queue:work" and it's executing every 1 minute. I've done some research, and I've seen some people saying that it consumes a lot of RAM

simplexml_load_file to read remote xml via url, connection reset by peer

若如初见. 提交于 2020-05-16 02:23:11
问题 When i tried to read a the xml output from the below url,over a cron job in godaddy shared hosting. https://www.bluedart.com/servlet/RoutingServlet?handler=tnt&action=custawbquery&loginid=MAA00001&format=xml&lickey=a28f0bb8690c75ce3368bb1c76ea98bc&verno=1.3&scan=1&awb=awb&numbers=14539611450 i get the following error Warning: simplexml_load_file() [function.simplexml-load-file]: SSL: Connection reset by peer in /Applications/XAMPP/xamppfiles/htdocs/indiagsl/cron/test.php on line 32 Warning:

simplexml_load_file to read remote xml via url, connection reset by peer

元气小坏坏 提交于 2020-05-16 02:22:10
问题 When i tried to read a the xml output from the below url,over a cron job in godaddy shared hosting. https://www.bluedart.com/servlet/RoutingServlet?handler=tnt&action=custawbquery&loginid=MAA00001&format=xml&lickey=a28f0bb8690c75ce3368bb1c76ea98bc&verno=1.3&scan=1&awb=awb&numbers=14539611450 i get the following error Warning: simplexml_load_file() [function.simplexml-load-file]: SSL: Connection reset by peer in /Applications/XAMPP/xamppfiles/htdocs/indiagsl/cron/test.php on line 32 Warning:

Is it possible to call a spring scheduled method manually

扶醉桌前 提交于 2020-05-14 22:29:15
问题 Is there a way to call a spring scheduled method (job) through a user interaction? I need to create a table with shown all jobs and the user should be able to execute them manually. For sure the jobs run automatically but the user should be able to start them manually. @Configuration @EnableScheduling public class ScheduleConfiguration { @Bean public ScheduledLockConfiguration taskScheduler(LockProvider lockProvider) { return ScheduledLockConfigurationBuilder .withLockProvider(lockProvider)