Etherwake and Cron or FCRON

Hello, today I spent almost the whole day searching and trying.

I wanted to wake up a server in the green network via cron, but then found out that there was no longer cron but FCRON with from hourly to monthly.

But now I need it neither hourly nor weekly, but always at the same time in the morning at half past four.

Now I tried to find out about IpFire and FCRON, but couldn’t figure it out.

What I understood is that FCRON does not have /etc/fctontab, just the division weekly, hourly etc.

Where can I then make such an entry, determined time and only on certain days?

Many greetings
M

fcron has an fcrontab which you can edit.

http://fcron.free.fr/doc/en/fcrontab.5.html
https://www.systutorials.com/docs/linux/man/1-fcrontab/

The only problem with modifying the root fcrontab is that sometimes it will be overwritten with a Core Update.

Follow this post for how to create a user specific fcrontab

https://community.ipfire.org/t/my-fcrontab-file-has-been-replaced-by-a-new-one/8064/18

I have an fcrontab entry for waking up one of my servers on a regular basis. My entry is as follows:-

# Restart server at 07:30 each day
30 7 * * * /home/fcronuser/scripts/wol_server.sh

The script wol_server then has your commands etc for carrying out the wake on lan.

You might be able to put the command directly into the fcrontab line as long as it is simple. I use a script as I am also testing that the server has woken up after a period by using pings and if not then putting a message into the logs.

2 Likes

great, thanks for this link!
That makes more sense to me now

the root cron is the root.orig ?

I think I can put that one line back in after an update too. I would like to change as little as possible in IpFire so as not to be unnecessarily. to make a mistake.
TO is to :slight_smile:

So if I put in the root.orig at the end and then restart fcton the sh file should run.

Thank you again!

The easiest way is calling fcrontab -e. This starts an editor ( default vi ) to change the fcrontab file, exit with save restarts fcrontab with the new contents ( like fcrontab -z ).
The wiki article about nano shows how to change the default editor from vi to nano.

1 Like