WebFaction
Community site: login faq

This question has two parts. Firstly, I noticed that Webfaction sets up a cron job to start the apache server every 20 minutes with:

0,20,40 * * * * ~/webapps/django/apache2/bin/start

I accidentally removed it with crontab -r and would like to add it back to the cron table. I could not find a crontab txt file for this cron job command. Is there one somewhere or should I just create my own? What I really wanted to do was add my own crontab to the existing list but I noticed that if I make my own apache crontab as above and run it with crontab my_apache_crontab.txt and then run crontab my_custom_crontab.txt the later crontab replaces the former one instead of just appending it to a list of cron jobs. How can I add additional cron jobs to the list without removing existing cron jobs?

asked 11 Dec '13, 13:18

Roland
21510
accept rate: 0%


You need to use: crontab -e to edit your crontab. You will overwrite it using the method you mentioned.

permanent link

answered 11 Dec '13, 18:47

bmeyer71 ♦♦
1.5k3613
accept rate: 33%

Interestingly, if there are no cron jobs queued, adding one with crontab -e doesn't work. If I first use crontab my_crontab_filt.txt to add one, the newly added cron job runs. Adding subsequent cron jobs with crontab -e then works.

(14 Dec '13, 14:20) Roland

Adding a new entry using crontab -e should work on an empty crontab. You can add:

2>&1 >> /home/username/cron.log

to the end of the command to redirect any errors/output to a log file. That should help to determine what is happening.

(14 Dec '13, 16:46) bmeyer71 ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×908
×225
×81
×50

question asked: 11 Dec '13, 13:18

question was seen: 2,948 times

last updated: 14 Dec '13, 16:46

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM