You are not logged in.

#1 2017-11-05 02:43:46

bjmag94
Member
Registered: 2017-11-01
Posts: 42

[SOLVED] Crontab

How do I set a cron in crontab?
I have enter in the terminal sudo crontab -e

I then chose the first option to edit the cron file, I now am stuck as to what to do

Do I delete everything inside that file, then enter *5***(run everything 5 mins?) /var/www/site.com/public_html/includes/updates/updatefile.php
?

Or something like that?

Last edited by Head_on_a_Stick (2017-11-05 10:57:45)

Offline

#2 2017-11-05 05:01:01

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,169
Website

Re: [SOLVED] Crontab

Do a web search for Debian cron task, there are several good walk-throughs on the first few pages.

Please do your homework before posting administrative help threads, and please post them in System and Administration when you have done so. Thanks.


I don't care what you do at home. Would you care to explain?

Offline

#3 2017-11-05 05:57:34

bjmag94
Member
Registered: 2017-11-01
Posts: 42

Re: [SOLVED] Crontab

hhh wrote:

Do a web search for Debian cron task, there are several good walk-throughs on the first few pages.

Please do your homework before posting administrative help threads, and please post them in System and Administration when you have done so. Thanks.

I have been looking on google for the last hour and a half, but nothing seems to work...
And okay!

Offline

#4 2017-11-05 06:18:36

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: [SOLVED] Crontab

This link gives some good examples.

https://manpages.debian.org/jessie/syst … .5.en.html

Offline

#5 2017-11-05 06:56:53

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 537

Re: [SOLVED] Crontab

bjmag94: Ninety minutes is not yet a long time for studying a new topic. I can relate to your situation though: you want to perform a task, not study about it.

So, I'd start by reading man page. Because it looks inexplicable of course (=too long, don't want to read), I continue by searching for simple examples. Don't mind if the pages you find are old, the older the better in this case.

Then I'd search through Ubuntu wiki. (Partly by habit, I used to be an Ubuntu/Debian swinger a decade ago.) When it comes to basic command line tasks, they are usually similar in Ubuntu, a Debian derivative. When topics in man pages and Debian site are often detailed and exhaustive, in Ubuntu wiki you may find same instructions simplified and analyzed for beginners.

After experimenting a bit you will be able to compare what you have learned with Debian administrators handbook and check if there are differences between those distros in your topic.

When you think you know what you are doing, it is time to open Arch wiki and find out, how little you knew. wink Then you can only open your startpage and start banging your head on the wall of endless information again.

Offline

#6 2017-11-05 07:59:54

bjmag94
Member
Registered: 2017-11-01
Posts: 42

Re: [SOLVED] Crontab

Thank you everyone, I will have a look soon smile
Hopefully I can figure something out

Offline

#7 2017-11-05 09:29:26

bjmag94
Member
Registered: 2017-11-01
Posts: 42

Re: [SOLVED] Crontab

I done

*/5 * * * * /usr/bin/php /var/www/site.com/includes/updates/updatefile.php

And that seems to be working okay for me

Offline

#8 2017-11-05 10:57:06

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] Crontab

Thanks for reporting back with your solution, I'm sure others will find that useful.

I for one have no clue how to use that mysterious crontab thingie big_smile

Anyway, I have marked the thread as [SOLVED]

Last edited by Head_on_a_Stick (2017-11-05 10:58:15)

Offline

Board footer

Powered by FluxBB