Where are my cron job?

You need to add many similar cron task. Accordingly, manually through the control panel to do it's not too much hunting. Maybe they are stored in some file that you can download, tweak in notepad, pour back?
September 19th 19 at 12:17
4 answers
September 19th 19 at 12:19
Solution
The correct answer is /var/spool/cron
this is not the correct way to edit cron jobs for, since this directory contains the
1. CentOS - one file per user with its tasks, he added with the command crontab
2. with Debian/Ubuntu folder for each user
We strongly recommend to get into this directory and edit something in there hands. It's like that to edit the file /etc/sudoers without visudo - arlene_Lebsa commented on September 19th 19 at 12:22
yeah I have CentOS there is 1 file per user. But what if the job should bulk to add or remove? - Eladio36 commented on September 19th 19 at 12:25
: if you have root, use directory /etc/cron.d - arlene_Lebsa commented on September 19th 19 at 12:28
: but there are no jobs... - Eladio36 commented on September 19th 19 at 12:31
: if they are not there, it does not mean that they can't go in there to add. tasks are added to the file with the description of tasks in the form
00 01 * * * rusty /home/rusty/rusty-list-files.sh
[schedule] [user] [command]
the convenience is that You can from the command shell bash (the bash script) to copy and remove the files jobs
in the case if You hands you can/should edit the jobs to cron, use the crontab
actually, you can do as you want and as convenient, but suggest to do so and experience shows that telate so - arlene_Lebsa commented on September 19th 19 at 12:34
September 19th 19 at 12:21
Unix cron job-and lie in several places:
1. /etc/cron.d - create a file with the jobs in the crown, it will be loaded and run on a specified schedule. in these files you need to specify the user on whose behalf the job will be executed
*/10 * * * * root /root/backup.db.sh
2. /etc/cron.daily, /etc/cron.hourly, /etc/cron.monthly, /etc/cron.weekly - you put scripts that will be executed daily, hourly, monthly and weekly basis. these are currently prepared schedules that are loaded and executed at a certain time
3. crontab-e - execution of this command with the key that will open a text editor to edit jobs in the crown of the current user. be careful - these jobs belong to the current user and will be executed on his behalf
accordingly, the most simple method for dynamic editing tasks cron is a manipulation of the tasks in /etc/cron.d
September 19th 19 at 12:23
Do you have a question control panel for the clients of the "Da Ponte hoster-Krivoruchko". Cpanel and all that.

To the tag unix it has not the slightest relationship.
because in UNIX, you can write
crontab список_заданий.txt
and all to download.
Where to ship your panel - you have to ask panel users, not UNIX.

However, in any case, if you got "a lot of the same type of cron task", then you're doing it wrong.
And in fact, can you? - arlene_Lebsa commented on September 19th 19 at 12:26
You in his own way)) but maybe the guy has a single script with a bunch of different options, and how to check for already running instance with a specific parameter it does not know the level of let's say not the same. While I agree that "a lot of the same tasks" sounds intimidating - after all, there are long arrays, loops, for iterating through the values in a single script. Yes, and the logic necessary to write so that similar challenges are met in turn with a single handler. - Eladio36 commented on September 19th 19 at 12:29
: imagine that the task of processing large and I do not fit at the time of the script in any way, so I make a few scripts, put them on the crowns and they all treated me with no little piece. - arlene_Lebsa commented on September 19th 19 at 12:32
: you heard in this case about set_time_limi(0) ? And when you run the script proverite that he was executed for example via ps-ax | grep, and if you already have an instance, you break a new instance of the script - Eladio36 commented on September 19th 19 at 12:35
: Yes, I have increased the time set_time_limit me not it is desirable that the script is too long so I though it increased but not indefinitely... - arlene_Lebsa commented on September 19th 19 at 12:38
: let me tell you a little secret Wallpaper: the console script set_time_limi(0) is the default - Eladio36 commented on September 19th 19 at 12:41
: like - alici commented on September 19th 19 at 12:44
I don't need set_time_limi(0) and the launch of crown cantilever considered? - Eladio36 commented on September 19th 19 at 12:47
Yes, this is a console launch - alici commented on September 19th 19 at 12:50
I was doing approximately as here in example #2 php.net/manual/ru/function.flock.php. you need to put somewhere the file. in the beginning of the script there is an attempt to get a lock on him. if it works, then the script is running, if not, this indicates that a previously executed process with this script and have a rest. I do not remember what version of PHP I did so, says that since 5.3.2 need to manually release the lock (close the file) at the end of execution of all Affairs of the script. it turns out that if suddenly the script Linnet, the file will remain locked and a new start attempt will be pissed. interesting will be removed if locking in case of sudden death of the process - Eladio36 commented on September 19th 19 at 12:53
interesting variant, it is possible to try, though such problems I like not that the script is run when the previous one is not yet completed - Seth commented on September 19th 19 at 12:56
: well, it is for such cases where a script can be executed is not known how many, newsletter send by the kilometer list, for example. that's just blind need test. I found it was less than PHP 5.3.2 and there lock herself filmed if the process suddenly died, I checked. the new PHP should zatestit. so the test looked like gyazo.com/f4a109e726795ca80902cb1fa1ca6cd1 - alici commented on September 19th 19 at 12:59
: thank you, now noticed that VDS has limited the number of descriptors and falls Too many open files in system if the task becomes a lot - Eladio36 commented on September 19th 19 at 13:02
September 19th 19 at 12:25
Well, actually, if you have root access, /etc/crontab, as a rule.
: see just above. In General, I suggest to insert your tasks in the correct crontab syntax. You know the same for him? - alici commented on September 19th 19 at 12:52
Yes, Ruth is, of course, let's see... - arlene_Lebsa commented on September 19th 19 at 12:28
either as written via the command "crontab-l" view, and using the command "crontab-e" edit. - Eladio36 commented on September 19th 19 at 12:31
it does not need manual editing, and download. And I wrote to him how to do the download. but he asked to write the case. sometimes I think the people around went crazy. - arlene_Lebsa commented on September 19th 19 at 12:34
well, or at least have forgotten how to read - Eladio36 commented on September 19th 19 at 12:37
In etc there is a cron.deny (empty) and a crontab file in it's current tasks no, Example of job definition and the folder cron.weekly, cron.monthly, cron.hourly (empty), cron.daily (multiple files) - arlene_Lebsa commented on September 19th 19 at 12:40
in crontab-e you can insert the code copied from notepad... This is certainly not a direct kopirovanie file, but still - Eladio36 commented on September 19th 19 at 12:43
: you can put your tasks in the crontab , and then install this file with the command (being in the /etc directory) "crontab crontab" to check performance. - alici commented on September 19th 19 at 12:46
: I now have a crontab file like this
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed

There are no active cron tasks. What do you propose to insert? - Eladio36 commented on September 19th 19 at 12:49
: just above the empty file or folder, now they will see all the files. Yes, the syntax in the course, but I was somehow confused to insert the task where no current tasks )) - Eladio36 commented on September 19th 19 at 12:55
: cron.daily I understand what a folder and cron.d did not catch up to at least the type of cron.user (user) - Seth commented on September 19th 19 at 12:58
: a little above - I meant my comment above, not the folder hierarchy - alici commented on September 19th 19 at 13:01

Find more questions by tags LinuxCronPHPWeb Development