cron

Script does not run under cron but runs manually

旧城冷巷雨未停 提交于 2020-01-15 09:48:08
问题 I have a script that a developer wrote for me which performs various functions mainly related to ffmpeg. When I run the script manually using sh /home/site/rawvids/encode.sh > /home/site/rawvids/log.txt The script runs fine but when it runs through cron it fails with error code 127 Any ideas? ls -l on the script shows: -rwxrwxrwx 1 site nobody 3786 Jul 23 17:07 /home/site/rawvids/encode.sh* 回答1: Error 127 means "command not found". It is likely that you run in the script some commands that

How can i use scheduler in seconds manner in Laravel 5.#

巧了我就是萌 提交于 2020-01-14 19:10:19
问题 there i am trying to schedule some task in larave, but i find it hard to schedule my task in every 20 seconds. Checking laravel doc. for laravel schedular, it didn't have such method for seconds. While there is ->cron('* * * * * *') "Run the task on a custom Cron schedule", but it also couldn't solve my problem. Below is my code in kernal.php file for scheduling. protected function schedule(Schedule $schedule) { // need to replace everyMinute() by some other method which can run it every 20

How to handle HHVM crash or when it becomes unresponsive?

删除回忆录丶 提交于 2020-01-14 06:25:29
问题 Current state is like this: Nginx -> HHVM -> PHP5-FPM. When HHVM crashes (quite often) it returns 502 error. I did @fallback workaround to nginx configuration, but I need to manually restart hhvm. here Automatically restarting HHVM when it stops responding but process not dead some PID listener cron is described, but sometimes hhvm just unresponsive with existing pid. How to monitor this? 回答1: I have the exact same problem - HHVM becomes unresponsive randomly (I haven't figured out why yet)

it is possible to use ajax, jquery page with cron?

喜欢而已 提交于 2020-01-14 06:22:09
问题 what my page do is: download an array from different server (first.php) php script parse values parsed values are sent with ajax call on the next (ajax called) page (second.php) there are some mysql queries if values pass condition, values are written to database .... So, when I run my first.php.. it loads second.php, everything's fine.. but what I want to know if it is possible to let it make by cron? If not, what should I do? Thanks. 回答1: There are certain things you need to understand in

Crontab rake job is not working with whenever gem in ruby

情到浓时终转凉″ 提交于 2020-01-14 05:46:13
问题 This is my crontab file generated by whenever: * * * * * /bin/bash -l -c 'cd /var/apps/path && RAILS_ENV=production echo "Testing" >> /new * * * * * /bin/bash -l -c 'cd /var/apps/path && RAILS_ENV=production rake somegroup:rake_job --silent' The first line is for test only and works as expected. However the rake job in the other line has nothing to do at all. In /var/log/syslog, both jobs are executed. Also tried using the absolute path of rake (/usr/local/rvm/gems/ruby-1.9.2-p136/bin/rake),

Nodejs for cron jobs

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-14 03:35:08
问题 I have a backbone application where users can make scheduled events. For these events I assume I will need use some type cron scheduling. It would be around 100 jobs ran a day. From my understanding cpanel use php for crob jobs (or does it?) either way I don't want to use php. Is it possible to have nodejs do some type of scheduling where it will run a particular event (in this case a ajax posts) at scheduled times through out the day for a considerable amount of days in the future? Also not

How do I add pre-hook and post-hook scripts that run before all of my cron jobs?

ⅰ亾dé卋堺 提交于 2020-01-13 22:40:33
问题 Suppose I have the following cron entry: * * * * * /bin/date Now suppose that I want scripts that run both before and after the cron job runs. I could modify the cron entry to look like this: * * * * * /bin/prehook ; /bin/date ; /bin/posthook Or if I wanted the exit code of the prehook to determine whether or not the date command runs, I could do this: * * * * * /bin/prehook && /bin/date ; /bin/posthook However, I'm looking for a solution that I might be able to apply globally to all cron

rails, whenever and docker - cron tasks doesn't run

为君一笑 提交于 2020-01-13 10:55:07
问题 My crontasks from schedule.rb doesn't work on docker container, but crontab -l result already contains this lines: # Begin Whenever generated tasks for: /app/config/schedule.rb 45 19 * * * /bin/bash -l -c 'bundle exec rake stats:cleanup' 45 19 * * * /bin/bash -l -c 'bundle exec rake stats:count' 0 5 * * * /bin/bash -l -c 'bundle exec rake stats:history' # End Whenever generated tasks for: /app/config/schedule.rb I can run this commands manually in container and it works. It seems like cron

How do you set up cron task? [closed]

╄→гoц情女王★ 提交于 2020-01-13 09:21:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I have never used CRON before but I want to use CRON in order to be able to perform schedule jobs for a php script. The php script is called "inactivesession.php" and in the php script is this code: <?php include('connect.php'); $createDate = mktime(0,0,0,10,25,date("Y")); $selectedDate = date('d-m-Y', (

Laravel 5.2: The Process class relies on proc_open, which is not available on your PHP installation

我是研究僧i 提交于 2020-01-13 08:40:43
问题 I use cron job to do some CRUD operation using laravel Task Scheduling. On localhost and on my Share-Hosting server it worked fine for months until recently I keep getting this error when I run cron job on my Share-Hosting server. I did not make any changes to the code on my Share-Hosting server. [2017-07-14 09:16:02] production.ERROR: exception 'Symfony\Component\Process\Exception\RuntimeException' with message 'The Process class relies on proc_open, which is not available on your PHP