crontab

cron job doesn't output to nohup.out

僤鯓⒐⒋嵵緔 提交于 2021-02-07 05:06:01
问题 i have start.sh bash script that is running though CRON JOB on ubuntu server start.sh contains bellow mentioned lines of code path of start.sh is /home/ubuntu/folder1/folder2/start.sh #!/bin/bash crawlers(){ nohup scrapy crawl first & nohup scrapy crawl 2nd & wait $! nohup scrapy crawl 3rd & nohup scrapy crawl 4th & wait } cd /home/ubuntu/folder1/folder2/ PATH=$PATH:/usr/local/bin export PATH python init.py & wait $! crawlers python final.py my issue is if i run start.sh my myself on command

cron job doesn't output to nohup.out

六月ゝ 毕业季﹏ 提交于 2021-02-07 05:05:24
问题 i have start.sh bash script that is running though CRON JOB on ubuntu server start.sh contains bellow mentioned lines of code path of start.sh is /home/ubuntu/folder1/folder2/start.sh #!/bin/bash crawlers(){ nohup scrapy crawl first & nohup scrapy crawl 2nd & wait $! nohup scrapy crawl 3rd & nohup scrapy crawl 4th & wait } cd /home/ubuntu/folder1/folder2/ PATH=$PATH:/usr/local/bin export PATH python init.py & wait $! crawlers python final.py my issue is if i run start.sh my myself on command

cron job doesn't output to nohup.out

懵懂的女人 提交于 2021-02-07 05:04:01
问题 i have start.sh bash script that is running though CRON JOB on ubuntu server start.sh contains bellow mentioned lines of code path of start.sh is /home/ubuntu/folder1/folder2/start.sh #!/bin/bash crawlers(){ nohup scrapy crawl first & nohup scrapy crawl 2nd & wait $! nohup scrapy crawl 3rd & nohup scrapy crawl 4th & wait } cd /home/ubuntu/folder1/folder2/ PATH=$PATH:/usr/local/bin export PATH python init.py & wait $! crawlers python final.py my issue is if i run start.sh my myself on command

php exec crontab not working

北城以北 提交于 2021-01-28 02:22:30
问题 I trying on my local CentOS 5.3 server, when I try to execute below line in my php code from apache webserver exec("crontab -l", $output, $arg); The $arg reply 127 (command not found code) Then I changed below code exec("/usr/bin/crontab -l", $output, $arg); The $arg reply 126 (Permission problem code) Here is my current permission of /usr/bin/crontab -rwsr-sr-x 1 root root 311288 Mar 15 2007 /usr/bin/crontab. And there is no /etc/cron.allow and /etc/cron.deny file. I already turned off Safe

Use sed to edit crontab

匆匆过客 提交于 2020-11-29 08:31:36
问题 I am writing a sed command that should uncomment an entry in crontab. Is there a better way to do this? The first option that comes to mind is sed. Example: crontab -l # 5 * * * 3 bash test.sh The sed command should uncomment this entry. This is what I have now. sed "s#\# 5 * * * 3 bash test.sh#5 * * * 3 bash test.sh#" Obviously this sed command doesn't do the task. ps:the sed command will eventually make its way into a script. 回答1: Sed is great for matching specific regular expressions and

Use sed to edit crontab

♀尐吖头ヾ 提交于 2020-11-29 08:31:08
问题 I am writing a sed command that should uncomment an entry in crontab. Is there a better way to do this? The first option that comes to mind is sed. Example: crontab -l # 5 * * * 3 bash test.sh The sed command should uncomment this entry. This is what I have now. sed "s#\# 5 * * * 3 bash test.sh#5 * * * 3 bash test.sh#" Obviously this sed command doesn't do the task. ps:the sed command will eventually make its way into a script. 回答1: Sed is great for matching specific regular expressions and

Crontab suddenly stop working on server?

自作多情 提交于 2020-08-08 13:19:06
问题 I have some crontab set on server on linux platform.Before that 2 days all the cron was running.I dont know what happen with crontab that they are not working now. All the cron was running before and i have added a new crontab after that they are not running may be this is the problem or is there other problem with that. I have check ther permission but that is ok with. New cron i have add look like that: */15 * * * * php myproject/sendmail.php 30 5 * * * php myproject/sendmailOnDiscount.php

crontab: python script being run but does not execute OS Commands

感情迁移 提交于 2020-08-04 06:55:56
问题 I have this crontab configuration setup and the following script. MAILTO="abc@avc.com" 41 15 * * * /usr/bin/python /home/atweb/Documents/opengrok/setup_and_restart.py > /home/atweb/Documents/opengrok/restart_log.txt 2&>1 And the python script is as this import subprocess import os from time import gmtime, strftime def main(): print(strftime("%a, %d %b %Y %X +0000", gmtime())) print('Running opengrok index..') subprocess.call(["cd", "/home/atweb/Documents/opengrok"]) subprocess.call(["./stop

Crontab script not generating text file [closed]

落爺英雄遲暮 提交于 2020-07-16 06:14:08
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Improve this question Here is my crontab entry: * * * * * /home/ec2-user/Test/test_thing.sh Here is the script, test_thing.sh : echo "asdf" >> ./bla.txt When I run it manually, it does generate the "bla.txt" file. However, it does not automatically do so (create the "bla.txt" file

Issue Running Artisan Command via Cronjob

て烟熏妆下的殇ゞ 提交于 2020-07-07 10:59:39
问题 I'm having a bit of a nightmare getting a crontab/cronjob to run an Artisan command. I have another Artisan command running via cronjob no problems but this second command won't run. Firstly, when I do 'crontab -e' and edit the file to contain: 0 0 * * * /usr/local/bin/php /home/purple/public_html/artisan feeds:send The cronjob doesn't run at all. If I go to cPanel and add the cronjob there, it runs but I receive the following error: open(public/downloads/feeds/events.csv): failed to open