Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, Where is crontab located? In my VPS server I found it at /var/spool/cron But is this ALWAYS the location to it? May there be alternative locations? Are there distros ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! kaisellgren's Avatar
    Join Date
    Dec 2008
    Location
    Lahti, Finland.
    Posts
    9

    Where is crontab located?


    Hi,

    Where is crontab located?

    In my VPS server I found it at /var/spool/cron

    But is this ALWAYS the location to it? May there be alternative locations? Are there distros using different locations or something?

    OR... is there a readable file that might show the location of installed crontab? That would be even better, I could read the file and then get the path from there...

    Another question if I may, can someone direct me into a good short english article describing how to setup cronjobs without cpanel or other gui tool, like how to make a cronjob with notepad and FTP program by uploading specific files into right place.

    Thanks in advance!

    EDIT: I'm working on a PHP script that makes cronjobs.

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    I'm not sure what the letter of the law is on this subject, but I've always found them in /etc/crontab and /etc/cron.d/.

  3. #3
    Just Joined! kaisellgren's Avatar
    Join Date
    Dec 2008
    Location
    Lahti, Finland.
    Posts
    9
    Strange. On my VPS it's located only at /var/spool/cron, but on one free shared hosting I tried it's in /etc/cron.d/

  4. #4
    Just Joined!
    Join Date
    Jul 2007
    Posts
    49
    This really depends on what/whos crontab your talking about.

    User crontabs are usually in my experience like you say in /var/spool/cron/ but system jobs like log archiving and such are usually in /etc/ under cron.d cron.hourly cron.daily cron.weekly depending on the schedule.

    One piece of advice is that you install your jobs in users crontabs as the system crontab can get wiped out by a system updates with out asking you first.

    Personally I wouldn't FTP the crontab to the correct location on the box as that is a glaring security issue as FTP is not that secure.
    Plus to run the crontab needs to have the correct permissions which the FTP server wont set for you.

    Here is a nice little page with info on cron Unix Crontab - setting up cron jobs using crontab

  5. #5
    Just Joined! kaisellgren's Avatar
    Join Date
    Dec 2008
    Location
    Lahti, Finland.
    Posts
    9
    Damn, it looks like they are located in several different locations... no what -.-

    Can anyone post me the most used versions of crontab and where they are located?

    I'm actually trying to do this with PHP. Use PHP to make cronjobs.. I already managed to make it through cpanel by cURL and POST and it worked on cPanel linux servers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •