Posts

Showing posts with the label cron

Multiple cron jobs in different files in AWS ec2

Image
Clash Royale CLAN TAG #URR8PPP Multiple cron jobs in different files in AWS ec2 I am using AWS ec2 for my projects.I Have more than 10 domain in one ec2 instance also which has more than 5 cron for each domain.Can i create different files for crontab. If create all the cron jobs code in a single file it is little bit confusing By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

How do I change the subject of each of my cron jobs?

Image
Clash Royale CLAN TAG #URR8PPP How do I change the subject of each of my cron jobs? This my crontab file: # Edit this file to introduce tasks to be run by cron. MAILTO=richardheyes@gmail.com 0 0 * * * ./backup.sh 0 8,12,16,20 * * * /bin/bash /kunden/homepages/46/d548322256/htdocs/dev/admin/sitemaps/create.sh 0 8,12,16,20 * * * `which php7.1` -q /kunden/homepages/46/d548322256/htdocs/dev/admin/sitemap-html/create.php As you can see there's a backup shell script, a shell script creates a plain text sitemap file and a PHP command-line script that creates a HTML sitemap. The resulting sitemaps are viewable here: https://www.rgraph.net/sitemap.txt https://www.rgraph.net/sitemap.html The resulting emails from the cron tasks come through to me as intended but with a subject line like this: Cron <u78819167@infongp-uk31> `which php7.1` -q /kunden/homepages/46/d548322256/htdocs/dev/admin/sitemap-html/create.php Cron <u78819167@infongp-uk31> ./backup.sh Which is just plain ugly....

Ubuntu cronjob without saving output

Ubuntu cronjob without saving output I want to call a php script on my VPS with cronjob, but I want it to do simple get request, without saving any logs, outputs and ect., just to make the php file to do its job, I don't want unnecessary files on my VPS. So, this is my command: * * * * * wget -q -O - http://example.com/cronjob/save_currency_rates Is this what I need? I'm not sure if this command saves some files, I'm not familiar with linux so far. I read the manual but it is confusing. 2 Answers 2 Try wget -q -O - http://example.com/cronjob/save_currency_rates >/dev/null 2>&1 wget -q -O - http://example.com/cronjob/save_currency_rates >/dev/null 2>&1 What is the difference? What di the last to parameters behind the path: >/dev/null 2>&1 – vinsa Feb 20 '15 at 13:22 ...