How to pass multiple parameters to cron job with curl?
You’ll notice that this doesn’t exactly work in your shell, either. What you need to do is put single quotes around the URL, like so: curl -sS ‘http://example.com/cronjob.php?days=1&month=1’
You’ll notice that this doesn’t exactly work in your shell, either. What you need to do is put single quotes around the URL, like so: curl -sS ‘http://example.com/cronjob.php?days=1&month=1’
To elaborate on Sougata Bose’s answer, I think the OP wants a command to be run every 10 seconds from a start time; not 10 seconds after the first minute and every subsequent minute. cron only has a resolution of 1 minute (there are other tools I think that may have finer resolutions but they … Read more
You can put something like this in the crontab file: 00 09 * * 7 [ $(date +\%d) -le 07 ] && /run/your/script The date +%d gives you the number of the current day, and then you can check if the day is less than or equal to 7. If it is, run your command. … Read more
Please read the other answers and comments, there’s a lot more information stated and nuances described (hash functions?) that I did not know when I answered this question. According to Jenkins’ own help (the “?” button) for the schedule task, 5 fields are specified: This field follows the syntax of cron (with minor differences). Specifically, … Read more
you may use this: # m h dom mon dow command 0 13,14,15 * * * /home/user/command your /home/user/command will be run at 13:00, 14:00 and 15:00
Just follow these steps: In Terminal: crontab -e. Press i to go into vim’s insert mode. Type your cron job, for example: 30 * * * * /usr/bin/curl –silent –compressed http://example.com/crawlink.php Press Esc to exit vim’s insert mode. Type ZZ to exit vim (must be capital letters). You should see the following message: crontab: installing … Read more
According to the Quartz CronTrigger tutorial (Quartz is used by www.cronmaker.com, referenced above), the ? wildcard is only used in the day of month and day of week fields: ? (“no specific value”) – useful when you need to specify something in one of the two fields in which the character is allowed, but not … Read more
Create the backup (export): crontab -l > /some/shared/location/crontab.bak Import it from the new user: crontab /some/shared/location/crontab.bak
Depending on your version of cron, you should be able to do (for hours, say): 1-23/2 Going by the EXTENSIONS section in the crontab(5) manpage: Ranges can include “steps”, so “1-9/2” is the same as “1,3,5,7,9”. For a more portable solution, I suspect you just have to use the simple list: 1,3,5,7,9,11,13,15,17,19,21,23 But it might … Read more