Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron #482

Closed
vaguecity opened this issue Mar 4, 2018 · 1 comment
Closed

Cron #482

vaguecity opened this issue Mar 4, 2018 · 1 comment

Comments

@vaguecity
Copy link

Hi, I know I sound like a complete idiot, but I have no idea what to do with the cron section. Everything is setup besides it. Pastes are working and can be posted, but if I set an expiration, they stay forever anyway. How do I setup cron? I have no idea what I'm doing and googling it didn't help.

@mrc0mmand
Copy link
Contributor

mrc0mmand commented Mar 4, 2018

Hi,

First, you have to set up a cron_key in <stikked_root>/application/config/stikked.php. Use something random as a key, e.g.:

$ cat /dev/urandom | head -n1 | md5sum
a7be6a8ae967a0183f2bd2cde2223f01  -

So the cron_key in stikked.php would look like this:

$config['cron_key'] = 'a7be6a8ae967a0183f2bd2cde2223f01';

Finally, set a cron job to call the Stikked's cron endpoint regularly (either using user-specific crontab or a system crontab):

# crontab -u apache -e

For this you can use the example from the config file, so the final crontab will look like this:

# crontab -u apache -l
*/5 * * * * curl --silent http://yoursite.com/cron/a7be6a8ae967a0183f2bd2cde2223f01

Replace the apache user to the user which your web server is running under (and don't forget to replace the curl's URL to a correct address of your Stikked installation).

Hope this makes the cron setup clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants